I've just cranked up AutoMenu 4 (previous version is 2) and was quite delighted by the improvements. Wow, this is really different. But I'm somewhat dismayed in that the first experiment I try turns out in confusing me. I added a listbox object with 3 entries labeled "One", "Two", and "Three" (no data attached to the display items.) Then the following code for the SelectionChanged event:
%SelectedIndex%=ListBoxObject(Listbox1).GetSelecte d
IF (%SelectedIndex%=0)
TextObject(MouseOverText).SetText("You selected item 1")
END IF
IF (%SelectedIndex%=1)
TextObject(MouseOverText).SetText("You selected item 2")
END IF
IF (%SelectedIndex%=2)
TextObject(MouseOverText).SetText("You selected item 3")
END IF
This works as expected for the second two items, but not the first. When I select the first item (item "One") there's no change to the displayed text. When I select the second or third items, the text changes as expected. What am I missing here?
%SelectedIndex%=ListBoxObject(Listbox1).GetSelecte d
IF (%SelectedIndex%=0)
TextObject(MouseOverText).SetText("You selected item 1")
END IF
IF (%SelectedIndex%=1)
TextObject(MouseOverText).SetText("You selected item 2")
END IF
IF (%SelectedIndex%=2)
TextObject(MouseOverText).SetText("You selected item 3")
END IF
This works as expected for the second two items, but not the first. When I select the first item (item "One") there's no change to the displayed text. When I select the second or third items, the text changes as expected. What am I missing here?
Comment