Announcement

Collapse
No announcement yet.

How to change the Label of a combobox 'on the fly'

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to change the Label of a combobox 'on the fly'

    Hi,

    I'm trying to change the label of a combobox whenever an item is selected inside the combox (referring to a change in language); in the "Actions/On Ctrl Message"; I have put this code :

    Code:
    -- These actions are triggered by the controls on the screen.
    tblComboLanguage = DlgComboBox.GetProperties( CTRL_COMBOBOX_02 );
    --Dialog.Message("Selected :", tostring(tblComboLanguage.Selected));
    if tblComboLanguage.Selected == 1 then
    	tblComboLanguage.Text = "Choose your language :";
    	DlgComboBox.SetProperties( CTRL_COMBOBOX_02, tblComboLanguage );
    else
    	tblComboLanguage.Text = "Choisissez votre langue :";
    	DlgComboBox.SetProperties( CTRL_COMBOBOX_02, tblComboLanguage );
    end
    my combo contains 2 items (English/French); the content of tblComboLanguage returned is ok.

    but this doesn't change nothing !

    thanks for any help,
    Domi.

  • #2
    Use DlgStaticText.SetProperties(CTRL_STATICTEXT_LABEL_ 01, {Text="new label"}) instead

    Comment


    • #3
      Hi jassing,

      :yes this runs perfectly !! thanks a lot ! but where have you find the name of the static label (CTRL_STATICTEXT_LABEL_01); except the name of the combo, I can't find it

      Sincerly,
      Domi.

      Comment

      Working...
      X