Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Listboxes, Moverbars and Checkboxes
Message
De
22/07/2003 16:07:58
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Listboxes, Moverbars and Checkboxes
Divers
Thread ID:
00812520
Message ID:
00812520
Vues:
56
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?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform