Problem with Control.Getlabel in DialogConfirm.xml
#1
I have a probem with the output of the following code:

xml:

<control type="radiobutton" id="11">
      <include>buttondimensions</include>
      <label>107</label>
      <include content="buttontextures">
      <param name="icon" value="buttonsdialogs/enabled.png" />
      </include>
</control>

<control type="label">
      <description>Heading</description>
      <left>15</left>
      <right>15</right>
      <font>MediumBold</font>
      <align>left</align>
      <textcolor>Dark2</textcolor>
      <label>$INFO[Control.Getlabel(11)]</label>
</Control>

the following output is generated:
Code:
Yes ( )

But why there is "( )"?
Reply
#2
What is control ID 3015?
Reply
#3
(2019-07-24, 18:00)Hitcher Wrote: What is control ID 3015?

I'm sorry, it was my mistake. i've edited the code
Reply
#4
You've used a radiobutton instead of a button. Radio buttons have an On/Off state ()/(*).
Reply
#5
(2019-07-24, 19:03)Hitcher Wrote: You've used a radiobutton instead of a button. Radio buttons have an On/Off state ()/(*).
Too bad, because you can only use one texture with a button-control. But I need 2, thats why i've used radiobutton. Undecided
Reply
#6
You can easily make the info label a variable and then use String.Contains(Control.GetLabel,yes) and String.Contains(Control.GetLabel,no) for the conditions.
Reply
#7
(2019-07-24, 20:36)Hitcher Wrote: You can easily make the info label a variable and then use String.Contains(Control.GetLabel,yes) and String.Contains(Control.GetLabel,no) for the conditions.
Thanks for info. Smile

The controlbuttons with ID's 11 and 10 in DialogConfirm.xml unfortunately also contain other labels like "keep" and "remove", so n my opinion this is unfortunately not an option. do you have any other ideas? Smile
Reply
#8
Use a variable for the button texture?
Reply

Logout Mark Read Team Forum Stats Members Help
Problem with Control.Getlabel in DialogConfirm.xml0