Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Coloured command buttons
Message
De
13/04/1998 09:37:22
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00091273
Message ID:
00091496
Vues:
27
Hi Michel,
Couldn't locate my own class so made another class based on the suggestion of James Edgar using a container.
**************************************************
*-- Class:        mybutton (c:\temp\test.vcx)
*-- ParentClass:  container
*-- BaseClass:    container
*
DEFINE CLASS mybutton AS container
	Width = 108
	Height = 34
	SpecialEffect = 0
	Name = "mybutton"
	ADD OBJECT image1 AS image WITH ;
		Height = 21, ;
		Left = 4, ;
		Top = 5, ;
		Width = 21, ;
		Name = "Image1"
	ADD OBJECT label1 AS label WITH ;
		WordWrap = .T., ;
		BackStyle = 0, ;
		Caption = "Label1", ;
		Height = 53, ;
		Left = 27, ;
		Top = 3, ;
		Width = 69, ;
		Name = "Label1"
	PROCEDURE MouseUp
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		if nButton = 1
			this.specialeffect = 0
			this.visible = .f.
			this.visible = .t.
		endif
	ENDPROC
	PROCEDURE MouseDown
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		if nButton = 1
			this.specialeffect = 1
			this.visible = .f.
			this.visible = .t.
		endif
	ENDPROC
	PROCEDURE Click
		* 
		* Placeholder - to make click event snippet open when dblclicked in designer
	ENDPROC
	PROCEDURE image1.MouseUp
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.parent.mouseup(nButton, nShift, nXCoord, nYCoord)
	ENDPROC
	PROCEDURE image1.MouseDown
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.parent.mousedown(nButton, nShift, nXCoord, nYCoord)
	ENDPROC
	PROCEDURE image1.Click
		this.parent.click
	ENDPROC
	PROCEDURE label1.MouseUp
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.parent.mouseup(nButton, nShift, nXCoord, nYCoord)
	ENDPROC
	PROCEDURE label1.MouseDown
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.parent.mousedown(nButton, nShift, nXCoord, nYCoord)
	ENDPROC
	PROCEDURE label1.Click
		this.parent.click
	ENDPROC
ENDDEFINE
*
*-- EndDefine: mybutton
**************************************************
Pls note this is a basic class, you should enhance it to react to keyboard events, tabstop etc.
Cetin
>Cetin,
>
>Will do as you suggest and will check out Win97 files. Looking forward
>to you having access to your computer again.
>
>Michel.
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform