Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listboxes, Moverbars and Checkboxes
Message
From
22/07/2003 16:07:58
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Listboxes, Moverbars and Checkboxes
Miscellaneous
Thread ID:
00812520
Message ID:
00812520
Views:
55
I have created a listbox with checkboxes, using bmps, and also enabled the moverbars on the control. The problem I am having is when the item is checked and then that same item is moved in the list. Once the item is moved, when the user selects another item to be checked, it checks the item that was in the same position before the move. Example, I have 5 items in the list 1-5. I check item 4 and move it to position number 1 in the list, 4,1,2,3,5. When I check number 2 in the list, it checks number 1 in the list not the line I have currently highlighted. This is the code I have in the Double Click event:

LPARAMETERS nButton, nShift, nXCoord, nYCoord
IF LASTKEY()!= 5 AND LASTKEY() != 24
IF ThisForm.selectitemsel(This.ListItemID)=0
This.Picture(This.ListItemID)="checkbx.bmp"
ThisForm.selectitemsel(This.ListItemID)=1
ELSE
IF ThisForm.selectitemsel(This.ListItemID)=1
This.Picture(This.ListItemID)="box.bmp"
ThisForm.selectitemsel(This.ListItemID)=0
ENDIF
ENDIF
ENDIF

The list is setup with a Rowsourcetype = 0
Rowsource = tempselectlist (updatable cursor)
Moverbars = .t.
Columncount = 1

How do I keep what is selected, and when it is moved make sure that the next thing is selected is marked properly?
Next
Reply
Map
View

Click here to load this message in the networking platform