INPUT Label

Posts: 287
Just to say if you want to use INPUT label to do something with a script.
When you create a INPUT Label, there is no text inside and if you check with script if text label = "" it doesn't work.
It is only because the information in XML no exist before you write anything in INPUT label. Then if you clear your label you can check if INPUT Label = "" and it is ok.
Perhaps Nick could add this empty information in Input Label definition at the begining.
;)
Posts: 785
Sorry, not clear what you mean. You're saying you cannot check the Text of an Input before you put any text in it? That doesn't seem right.
Posts: 287
Just impossible to check on a new widget if the text is empty, but on control you see it empty.
Only because <Text></Text> not exist in XML, first you can control, second get text, and third just create and not possible to check.
3 differnt exemple below
<Inputs>
    <ControlInput _TypeName="ATVO.ThemeEditor.ThemeModels.ControlInput" BorderColor="#FFCCCCCC" BorderThickness="1,1,1,1" IsLocked="False" Left="225" Top="60" Width="165" Height="30" ZIndex="0" FontColor="#FFFFFFFF" Name="I_serie_name">
      <Text></Text>
      <BackgroundColor>#FF252525</BackgroundColor>
    </ControlInput>
    <ControlInput _TypeName="ATVO.ThemeEditor.ThemeModels.ControlInput" BorderColor="#FFCCCCCC" BorderThickness="1,1,1,1" IsLocked="False" Left="450" Top="30" Width="120" Height="30" ZIndex="0" FontColor="#FFFFFFFF" Name="I_entete_#">
      <Text>#lamotors</Text>
      <BackgroundColor>#FF252525</BackgroundColor>
    </ControlInput>
    <ControlInput _TypeName="ATVO.ThemeEditor.ThemeModels.ControlInput" BorderColor="#FFCCCCCC" BorderThickness="1,1,1,1" IsLocked="False" Left="0" Top="0" Width="120" Height="30" ZIndex="0" FontColor="#FFFFFFFF" Name="Input1">
      <BackgroundColor>#FF252525</BackgroundColor>
    </ControlInput>
  </Inputs>

Edited (1 time)
Posts: 785
Whether the XML element exists or not should not matter. If it does not exist the text will remain empty, but you can still compare with the regular check, such as:
var input = item.Theme.ControlInputs.Find("Input1");
if (string.IsNullOrWhiteSpace(input.Text))
{
// empty
}
Posts: 287
Ok, it is again a problem of knowledge. :)