Jump to content
uniGUI Discussion Forums
Sign in to follow this  

A Suggestion

Recommended Posts

This is not a complaint  I am very happy with UniGUI, BUT

it seems there are many times I get on the support forum and ask how to do something and the answer is I have to do it in JavaScript.


DelphiDeveloper goes to the trouble to answer the question


for example:




Can you try this approach for now ?!:


UnimLabel1 -> ClientEvents -> UniEvents -> function afterCreate:

function afterCreate(sender)
    var me = sender;
        function() {

Best regards,


But really wouldn't it have been easier for everyone if he just added this code to the constructor of UnimCustomLabel?
I changed the constructor, and it works (just as a test, I know it will go away next release.
constructor TUnimCustomLabel.Create(AOwner: TComponent);
  Width  := 225;
  Height := 23;

    ('afterCreate=function afterCreate(sender) '#13#10'{'#13#10'    var me = sender;'#13#10'    me.element.on("tap",'#13#10'        function() {'#13#10'               me.fireEvent("click");'#13#10'        }'#13#10'    )'#13#10'}');


This is just an example.  The font properties are ignored on mLable.  I added the code DelphiDeveloper supplied to the Update function and it also works.  


It just seems to me it would be just as easy to add this functionality than it would be to send me JS code to fix it, then you won't be asked that question again because I see people (including me) ask the same question again.

  • Upvote 2

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this