Jump to content

Add text on Background of UniMainModule


artem_niko

Recommended Posts

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;

 

  • Like 1
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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;

 

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
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!

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...