RobYost Posted June 11, 2017 Share Posted June 11, 2017 Mobile Edit and Lable are missing the Font property. I am not very familiar with writing components, but if someone could give me direction on how to do it, I would like to try to make a descendant of TunimEdit that has a font, etc. I am also thinking of starting a group wiki where we could collaborate by adding properties to existing controls. For example, I have done something very simple; add a Dirty flag to TUnimEdit. unit mUniRyEdit; interface uses System.SysUtils, System.Classes, uniGUIBaseClasses, uniGUIClasses, unimEdit; type TmUniRyEdit = class(TUnimEdit) private FDirty: Boolean; protected { Protected declarations } public { Public declarations } published property Dirty: Boolean read FDirty write FDirty default False; end; procedure Register; implementation procedure Register; begin RegisterComponents('UniYostPak', [TmUniRyEdit]); end; end. But I would like to learn to do more. Any help would be appreciated. -Rob Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 11, 2017 Share Posted June 11, 2017 Hi, Can help you, try this: http://forums.unigui.com/index.php?/topic/7824-how-to-change-the-font-color-in-a-tunimlabel/&do=findComment&comment=39985 Best regards, Quote Link to comment Share on other sites More sharing options...
RobYost Posted June 11, 2017 Author Share Posted June 11, 2017 Thank you UnimLabel1 -> ClientEvents -> UniEvents -> ... function beforeInit(sender, config) { config.style = "text-align:center; color:green;"; } This works. How would I add this to a component? So it could be set from properties within the component. Quote Link to comment Share on other sites More sharing options...
mhmda Posted June 12, 2017 Share Posted June 12, 2017 +1 mobile components missing a very basic properties such font Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 12, 2017 Share Posted June 12, 2017 Hi, How would I add this to a component? So it could be set from properties within the component. At the moment you can try this: uses ... uniGUIJSUtils, Graphics; AddStyle('color', uniColor2Web(clGreen)); Best regards, Quote Link to comment Share on other sites More sharing options...
RobYost Posted June 12, 2017 Author Share Posted June 12, 2017 I'm sorry, I don't know how to use addstyle() Quote Link to comment Share on other sites More sharing options...
asapltda Posted June 19, 2023 Share Posted June 19, 2023 On 6/12/2017 at 6:33 AM, RobYost said: I'm sorry, I don't know how to use addstyle() Good Night could solve the location of the code Greetings Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 19, 2023 Share Posted June 19, 2023 Hello, 12 hours ago, asapltda said: could solve the location of the code ? 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.