IPButton - Text can not be changed from Arduino

Support forum for MegunoLink
Post Reply
yum
Posts: 4
Joined: Thu Oct 18, 2018 9:24 am

Thu Oct 18, 2018 1:20 pm

Hi,

I play around with the "TurnLEDOffAndOn" example and augmented the code by:

Code: Select all

void SendToIPButton1()
{
  InterfacePanel MyPanel;          
  MyPanel.ShowControl(F("IPButton1"));
  .
  .
  // my added code line:
   MyPanel.SetText(F("IPButton1"),F("uhu"));
}

but the text of the button does not change - the interface says
Text doesn't exist in IPButton1
... but of course Text is a member of the button class.


Here is the serial log:
MegunoLink Pro - Turning and LED on and off
-----------------------------
!ToggleLED
Got ToggleLED command.
{UI|SET|IPButton1.Visible=True}
{UI|SET|IPButton1.Visible=False}
{UI|SET|IPButton1.Visible=True}
{UI|SET|IPButton1.Text=uhu}
{UI|SET|IPButton1.Enabled=True}
{UI|SET|IPButton1.ForeColor=Red}
{UI|SET|IPButton1.BackColor=Blue}
philr
Posts: 446
Joined: Mon May 26, 2014 10:58 am

Thu Oct 25, 2018 3:36 am

Hi Yum, currently the text on a button is a design time only property. I'll add it to the feature request list.

Cheers
Phil
Post Reply