Jump to content


Photo

Trying to update Label - Please advise

Label

  • Please log in to reply
2 replies to this topic

#1 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 155 posts
  • LocationMelbourne Australia

Posted 29 November 2017 - 11:26 PM

Below does not work, I know just setting the Caption normally works but I am trying to understand why the JS version does not - please advise - thanks.
 
    UniSession.AddJS(LoginmForm.lblIP.JSName+'.Caption = ''Sleeping ...'' ;');
    UniSession.AddJS(LoginmForm.lblIP.JSName+'.RePaint;');

  • 0

Andy


#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3625 posts

Posted 30 November 2017 - 05:51 AM

Hi,

 

Sorry, For what purpose do you want to use UniSession.AddJS ?!

 

Use:

UnimLabel1.Caption := 'New Caption';

Or, for example:

UnimLabel1.JSInterface.JSCall('element.setHtml', ['NewCaption']);
UnimLabel1.JSInterface.JSCall('element.setText', ['NewCaption']);

...

 

Best regards,


  • 0

#3 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 155 posts
  • LocationMelbourne Australia

Posted 30 November 2017 - 06:31 AM

thanks


  • 0

Andy






Also tagged with one or more of these keywords: Label

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users