Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cool toolbox for VFP 6.0
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01058490
Message ID:
01058507
Views:
9
This message has been marked as a message which has helped to the initial question of the thread.
>Hi
>
>I would like a toolbar class to my VFP6 APPS, better than the native VFP class
>
>Moises

In addition to what Terry suggested, you could also create your own toolbar class as follows:
PUBLIC oform as toolbarform 
oform = CREATEOBJECT("toolbarform")
m.oform.show() 

DEFINE CLASS toolbarform as Form 
	ADD OBJECT otoolbar ;
		as mytoolbar ;
		WITH top = 0, ;
			left = 0, ;
			visible = .t.
	PROCEDURE Init()
		this.Resize() 
	ENDPROC 
	
	PROCEDURE Resize()
		this.otoolbar.width = this.Width 
	ENDPROC 
ENDDEFINE 

DEFINE CLASS mytoolbar as Container 
	width = 500
	height = 36
	specialeffect = 0
	ADD OBJECT imgbtn ;
		as imagetoolbarbutton ;
		WITH left = 20, ;
			top = 6, ;
			picture ="" 

	ADD OBJECT btn1 ;
		as toolbarbutton ;
		WITH left = 20 + 27, ;
			top = 6, ;
			picture ="" 

	PROCEDURE imgbtn.click()
		MESSAGEBOX("I am an image toolbar button")
	ENDPROC && 

	PROCEDURE btn1.click()
		MESSAGEBOX("I am a toolbar button")
	ENDPROC && 
ENDDEFINE 

DEFINE CLASS ImageToolBarButton as Image
	width = 24
	height = 24
ENDDEFINE 

DEFINE CLASS ToolBarButton as CommandButton 
	width = 24
	height = 24
ENDDEFINE 
Dawa Tsering


"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."

- Ephesians 4:29-30 NIV

Dare to Question -- Care to Answer

Time is like water in a sponge, as long as you are willing you can always squeeze some.

--Lu Xun, Father of Modern Chinese Literature

Previous
Reply
Map
View

Click here to load this message in the networking platform