Jump to content


Photo

Underline a label


  • Please log in to reply
4 replies to this topic

#1 WillemvanZyl

WillemvanZyl

    Member

  • uniGUI Subscriber
  • PipPip
  • 13 posts

Posted 11 January 2018 - 09:05 AM

Hi,

I want to just set a label to be underlined.

s := 'document.getElementById("' + lbForgotPass.JSName + '_id").style.textDecoration = "underline"
UniSession.AddJS(s);

Does not work. any help?<

PS. having these properties exposed in Delphi in the future would be really great

Kind Regards


  • 0

#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3885 posts

Posted 11 January 2018 - 09:24 AM

Hi,

 

UniLabel -> Font -> Style -> [fsUnderline]  ?!


  • 0

#3 WillemvanZyl

WillemvanZyl

    Member

  • uniGUI Subscriber
  • PipPip
  • 13 posts

Posted 11 January 2018 - 09:31 AM

The .Font Property is not exposed in Mobile?


  • 0

#4 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3885 posts

Posted 11 January 2018 - 09:40 AM

Sorry,

 

For mobile, one possible solution, for example:

procedure TMainmForm.UnimFormCreate(Sender: TObject);
begin
  UnimLabel1.JSInterface.JSCall('element.setStyle', ['text-decoration', 'underline']);
end;

  • 0

#5 WillemvanZyl

WillemvanZyl

    Member

  • uniGUI Subscriber
  • PipPip
  • 13 posts

Posted 11 January 2018 - 09:42 AM

That works, thanks :-)


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users