Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Looking for command button/drop down menu class
Message
De
21/02/2008 06:02:07
 
 
À
20/02/2008 11:36:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01294303
Message ID:
01294651
Vues:
19
Hi Fred,
i just build a little visual class which might give you an idea on how to create just what you need. However, I don't know how to post the pictures in this forum, so if you're interested in them, just send me an email.

To use this class in your form, all you have to do is binding the click events of the three navigation-images to your own methods for previous, next and history.
*-- Take care to replace the picture selections with correct pathnames
DEFINE CLASS cntnav AS container

	Width = 78
	Height = 28
	Picture = "nav_background.bmp"
	BorderWidth = 0
	Name = "cntnav"

	ADD OBJECT imghistory AS image WITH ;
		Picture = "nav_history_inactive.bmp", ;
		BackStyle = 0, ;
		Height = 21, ;
		Left = 52, ;
		MousePointer = 15, ;
		Top = 4, ;
		Width = 23, ;
		Name = "imgHistory"

	ADD OBJECT imgnext AS image WITH ;
		Picture = "nav_next_inactive.bmp", ;
		BackStyle = 0, ;
		Height = 26, ;
		Left = 30, ;
		MousePointer = 15, ;
		Top = 1, ;
		Width = 26, ;
		Name = "imgNext"

	ADD OBJECT imgprev AS image WITH ;
		Picture = "nav_prev_inactive.bmp", ;
		BackStyle = 0, ;
		Height = 26, ;
		Left = 1, ;
		MousePointer = 15, ;
		Top = 1, ;
		Width = 26, ;
		Name = "imgPrev"

	PROCEDURE imghistory.MouseLeave
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		This.Picture = [nav_history_inactive.bmp]
	ENDPROC

	PROCEDURE imghistory.MouseEnter
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		This.Picture = [nav_history_active.bmp]
	ENDPROC

	PROCEDURE imgnext.MouseLeave
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		This.Picture = [nav_next_inactive.bmp]
	ENDPROC

	PROCEDURE imgnext.MouseEnter
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		This.Picture = [nav_next_active.bmp]
	ENDPROC

	PROCEDURE imgprev.MouseLeave
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		This.Picture = [nav_prev_inactive.bmp]
	ENDPROC

	PROCEDURE imgprev.MouseEnter
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		This.Picture = [nav_prev_active.bmp]
	ENDPROC

ENDDEFINE
Best Regards
-Tom

Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.

Oh, and BTW: 010101100100011001010000011110000101001001101111011000110110101101110011
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform