Freeman35 Posted July 9, 2017 Share 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 Link to comment Share on other sites More sharing options...
RobYost Posted July 13, 2017 Share 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 Link to comment Share on other sites More sharing options...
Freeman35 Posted July 14, 2017 Author Share 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 Link to comment Share on other sites More sharing options...
RobYost Posted July 14, 2017 Share 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 Link to comment Share on other sites More sharing options...
Freeman35 Posted July 14, 2017 Author Share 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 Link to comment Share on other sites More sharing options...
Freeman35 Posted August 7, 2017 Author Share 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 Link to comment Share on other sites More sharing options...
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.