artem_niko Posted March 4, 2020 Share Posted March 4, 2020 Hello! As we know, we can load background picture in UniMainModule. It's very good. I'm interesting how add text in, for example, top left corner in UniMainModule? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 4, 2020 Share Posted March 4, 2020 Hello, This post may help you: 1 Quote Link to comment Share on other sites More sharing options...
artem_niko Posted March 4, 2020 Author Share Posted March 4, 2020 1 hour ago, Sherzod said: Hello, This post may help you: Thank you! Working! But! If I move mouse on any component on UnLiginForm1, I see hint with text from top left corner. How improve this? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 4, 2020 Share Posted March 4, 2020 22 minutes ago, Артем said: But! If I move mouse on any component on UnLiginForm1, I see hint with text from top left corner. Need to check. Quote Link to comment Share on other sites More sharing options...
artem_niko Posted March 4, 2020 Author Share Posted March 4, 2020 6 minutes ago, Sherzod said: Need to check. Ok. I will be waiting answer from you. This hint showing on any component on form and create trouble for work :/ Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 5, 2020 Share Posted March 5, 2020 17 hours ago, Артем said: This hint showing on any component on form and create trouble for work :/ Hello, OK. Don't use the above mentioned solution. Simply try this: Uses ..., uniLabel; procedure TMainForm.UniFormCreate(Sender: TObject); begin with TUniLabel.Create(Self) do begin Caption := 'TEST'; Font.Size := 36; JSInterface.JSConfig('renderTo', [JSInterface.JSStatement('Ext.getBody()')]); end; end; 1 Quote Link to comment Share on other sites More sharing options...
artem_niko Posted March 5, 2020 Author Share Posted March 5, 2020 4 hours ago, Sherzod said: Hello, OK. Don't use the above mentioned solution. Simply try this: Uses ..., uniLabel; procedure TMainForm.UniFormCreate(Sender: TObject); begin with TUniLabel.Create(Self) do begin Caption := 'TEST'; Font.Size := 36; JSInterface.JSConfig('renderTo', [JSInterface.JSStatement('Ext.getBody()')]); end; end; Ok, this is working good! One question. If now I use UniLabel, how set position for UniLabel in left bottom corner? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 5, 2020 Share Posted March 5, 2020 Ok, I will check. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 6, 2020 Share Posted March 6, 2020 18 hours ago, Артем said: If now I use UniLabel, how set position for UniLabel in left bottom corner? Try this: with TUniLabel.Create(Self) do begin Caption := 'TEST'; Font.Size := 36; JSInterface.JSConfig('renderTo', [JSInterface.JSStatement('Ext.getBody()')]); JSInterface.JSCode('Ext.onReady(function(){' + JSName +'.setStyle("position", "absolute");' + JSName +'.setStyle("top", null);' + JSName +'.setStyle("bottom", 0);' + '});' ); end; 1 Quote Link to comment Share on other sites More sharing options...
artem_niko Posted March 15, 2020 Author Share Posted March 15, 2020 On 3/6/2020 at 3:13 PM, Sherzod said: Try this: with TUniLabel.Create(Self) do begin Caption := 'TEST'; Font.Size := 36; JSInterface.JSConfig('renderTo', [JSInterface.JSStatement('Ext.getBody()')]); JSInterface.JSCode('Ext.onReady(function(){' + JSName +'.setStyle("position", "absolute");' + JSName +'.setStyle("top", null);' + JSName +'.setStyle("bottom", 0);' + '});' ); end; Thank's, @Sherzod! Working! 1 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.