Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
List Boxes in Containers
Message
De
21/12/1999 10:32:30
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
 
À
21/12/1999 10:13:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00306667
Message ID:
00306677
Vues:
27
Kevin-

>I am using multiple containers in one single form which only become enabled/visible when required. Containers that contain list boxes will not behave correctly when clicked on if another container - containing a list box - has been previously used. ie - the currently used container still thinks there is a list box in front of it and refuses to allow mouse action on it.
>
>This can be easily recreated by putting two containers (each containing a list box) on a form, then programmatically put one in front of the other, and the one that was loaded first will be slightly unusable - even though it is in front. Obviously the list boxes are in the same position on the screen.


I tried the code that follows to recreate your situation, but I wasn't successful. Can you modify it or tell me what to add to see the effect you are?
 ox = create('form1')
ox.show(1)

**************************************************
*-- Form: form1 (c:\nec\library\classes\temp1.scx)
*-- ParentClass: form
*-- BaseClass: form
*-- Time Stamp: 12/21/99 08:42:12 AM
*
DEFINE CLASS form1 AS form


Top = 0
Left = 0
Height = 246
Width = 270
DoCreate = .T.
Caption = "Form1"
Name = "Form1"


ADD OBJECT command1 AS commandbutton WITH ;
Top = 21, ;
Left = 167, ;
Height = 27, ;
Width = 84, ;
Caption = "Command1", ;
Name = "Command1"


ADD OBJECT command2 AS commandbutton WITH ;
Top = 51, ;
Left = 166, ;
Height = 27, ;
Width = 84, ;
Caption = "Command2", ;
Name = "Command2"


ADD OBJECT container1 AS container WITH ;
Top = 25, ;
Left = 14, ;
Width = 113, ;
Height = 182, ;
Visible = .F., ;
Name = "Container1"


ADD OBJECT form1.container1.list2 AS listbox WITH ;
Height = 170, ;
Left = 6, ;
Top = 7, ;
Width = 100, ;
Name = "List2"


ADD OBJECT container2 AS container WITH ;
Top = 52, ;
Left = 28, ;
Width = 113, ;
Height = 182, ;
Visible = .F., ;
Name = "Container2"


ADD OBJECT form1.container2.list2 AS listbox WITH ;
Height = 170, ;
Left = 6, ;
Top = 7, ;
Width = 100, ;
Name = "List2"


PROCEDURE MouseMove
LPARAMETERS nButton, nShift, nXCoord, nYCoord
wait clear
ENDPROC


PROCEDURE command1.Click
thisform.container1.visible = .t.
thisform.container2.visible = .f.
ENDPROC


PROCEDURE command2.Click
thisform.container2.visible = .t.
thisform.container1.visible = .f.
ENDPROC


PROCEDURE list2.MouseMove
LPARAMETERS nButton, nShift, nXCoord, nYCoord
wait window "over container1" nowait noclear
ENDPROC


PROCEDURE list2.MouseMove
LPARAMETERS nButton, nShift, nXCoord, nYCoord
wait window "over container2" nowait noclear
ENDPROC


ENDDEFINE
*
*-- EndDefine: form1
**************************************************

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform