Il semble que les cookies ne soient pas activés dans votre navigateur. Veuillez activer les cookies pour garantir une expérience du site optimale.
Affichage des résultats 1 à 2 sur 2
  1. #1
    Date d'inscription
    janvier 2007
    Messages
    132

    [BUG] ListBox:SetSelectedIndex

    First I'd like to note that GetSelectedIndex and SetSelectedIndex are not documented and need to be. They are an integral part of any list box.

    GetSelectedIndex works fine, but SetSelectedIndex has no effect. Not only should SetSelectedIndex actually set the selection, if you pass 0 or nil it should clear the selection.

    In my case I'm moving items from one list box to another and need to programatically (from lua) exert some control over what is selected in the list boxes.

    If I'm just missing something, please explain.

    Thanks,
    Frell
    [center][url=http://www.thirstytravelersinn.com/][charsig=http://lotrosigs.level3.turbine.com/0420800000003ba01/signature.png]Frello[/charsig][/url][/center]

  2. #2
    Date d'inscription
    janvier 2007
    Messages
    132

    Re: [BUG] ListBox:SetSelectedIndex

    Turns out, my bug report above was premature in describing what the problem is. I can see now why these are undocumented features.

    SetSelectedIndex is 0-based.
    GetSelectedIndex returns a 1-based index.

    However, SetSelectedIndex(-1) *does* work to clear the selection!

    So, be sure to do the correct conversion to use SetSelectedIndex properly until this gets fixed.

    Frell
    [center][url=http://www.thirstytravelersinn.com/][charsig=http://lotrosigs.level3.turbine.com/0420800000003ba01/signature.png]Frello[/charsig][/url][/center]

 

 

Règles de messages

  • Vous ne pouvez pas créer de nouvelles discussions
  • Vous ne pouvez pas envoyer des réponses
  • Vous ne pouvez pas envoyer des pièces jointes
  • Vous ne pouvez pas modifier vos messages
  •  

La session de ce formulaire a expiré. Vous devez recharger la page.

Recharger