We have detected that cookies are not enabled on your browser. Please enable cookies to ensure the proper experience.
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2007
    Posts
    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
    Join Date
    Jan 2007
    Posts
    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]

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

This form's session has expired. You need to reload the page.

Reload