Home > database >  Questions about the LISTBOX control options
Questions about the LISTBOX control options

Time:10-03

The purpose of I
On an interface only listbox control and two command buttons "up" and "down", select an item in the listbox control, press the "up" button, the current option is up to its previous position before a, on the contrary, down to it the following options below before
How to do this problem?

CodePudding user response:

The integer li_index
Li_index=lb. Selectedindex ()
Move up
If li_index & lt;=1 then
Return
End the if
Lb. Setsate (li_index, false)
Lb. Setsate (li_index - 1, true)
//////////
Down, to determine whether it has been to the last one, if is not respond, if you want to run to the first, write their own

Lb. Setsate (li_index, false)

Lb. Setsate (li_index + 1, true)

CodePudding user response:

Feel it's not a good way to first remove and insert again
  • Related