Freeman35 Posted July 9, 2017 Posted July 9, 2017 Hello, I wanna use fontawesome like a them example. but how to do this in unigui? http://fontawesome.io/examples/ function added(sender, container, pos, eOpts) { sender.addCls('fa fa-book'); Icon draw on top of edit, and edit size decreace. its same on button. Thank you Quote
RobYost Posted July 13, 2017 Posted July 13, 2017 I was able to get fontawesome working with the stars font. http://forums.unigui.com/index.php?/topic/8717-5-star-rating/ This thread shows the process. I am using version 3, I see you are using version 4. If I get some time I might try to update and see if there are any differences. But, for me the steps were: Put the css file in ServerModule->CustomFiles ServerModuleBeforeInit: procedure TUniServerModule.UniGUIServerModuleBeforeInit(Sender: TObject); begin MimeTable.AddMimeType('eot', 'application/font', False); end; Put the font files in the font folder: fontawesome-webfont.eot fontawesome-webfont.woff fontawesome-webfont.ttf 1 Quote
Freeman35 Posted July 14, 2017 Author Posted July 14, 2017 Thanx your answer RobYost, and sorry for late answer. Yes, I followed your messages, and I added and I could use fontawesome. I can use fontawesome css but my problem is not correct use. example see screenshot on my first message. On fontawesome web site, talk about "<i class="fa xxxxxx"></i>" tag, maybe my problem can be this. I don't know how to add this tag (I mean "i") in uni gui. I can add class but not tag. unfortunately, there is no help or demo about unigui. I hope new release has it I wish to some one make a code bank. much useful then forum. 'cos not all user (like me) knowledge about js and web codes. just for exaple: https://github.com/delphidabbler/codesnip -> desktop applicaion http//snippets.delphidabbler.com -> on web why not on with unigui Regards Quote
RobYost Posted July 14, 2017 Posted July 14, 2017 https://github.com/d...abbler/codesnip -> desktop applicaion http//snippets.delphidabbler.com -> on web why not on with unigui both these give me a 404 Quote
Freeman35 Posted July 14, 2017 Author Posted July 14, 2017 https://github.com/delphidabbler/codesnip http://snippets.delphidabbler.com/ I don't know why, added extra chars on links remove last chars. I tested this time both links sorry. Quote
Freeman35 Posted August 7, 2017 Author Posted August 7, 2017 My Solutions: TUniLabel.TextConversion:= txtHTML; TUniLabel.Caption:= '<i class="fa fa-spinner fa-spin fa-2x fa-fw"></i>'; TUniEdit.FieldLabel:= '<i class="fa fa-spinner fa-spin fa-2x fa-fw"></i>'; TUniEdit.FieldLabelAlign:= laRight;// not have to TUniEdit.FieldLabelSeperator:= ' ';// not empty, 'cos empty add ':' TUniEdit.FieldLabelWidth:= 20; // or what you want Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.