Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Developer-defined Btn(s) on Standard VFP toolbar
Message
 
 
To
26/01/2002 09:28:41
General information
Forum:
Visual FoxPro
Category:
Installation, Setup and Configuration
Miscellaneous
Thread ID:
00611029
Message ID:
00611319
Views:
32
This message has been marked as the solution to the initial question of the thread.
Here's some code that should let you started.
DO mytoolbar.prg
...
* mytoolbar.prg
CLEAR ALL
_screen.AddProperty("oMytollbar", NEWOBJECT("mytoolbar", "test"))
_screen.oMytollbar.Dock(0, 20000, 0)
_screen.oMytollbar.Show()
ENDPROC
...

*Class:  mytoolbar of test.vcx
DEFINE CLASS mytoolbar AS toolbar
	Caption = "Toolbar1"
	Height = 28
	Left = 0
	Top = 0
	Width = 33
	Name = "mytoolbar"
	ADD OBJECT command1 AS commandbutton WITH ;
		Top = 3, ;
		Left = 5, ;
		Height = 22, ;
		Width = 23, ;
		Picture = "..\program files\microsoft visual foxpro 7\graphics\icons\misc\misc01.ico", ;
		Caption = "", ;
		Name = "Command1"
	PROCEDURE command1.Click
		CLEAR
		CLOSE ALL
		KEYBOARD "{CTRL+F2}DO mytoolbar{ENTER}" CLEAR
		THIS.Parent.release()
	ENDPROC


ENDDEFINE
>Hey, I have really non-standard question to all of you!
>
>It sounds simple:
>On a Standard VFP toolbar I want to have my own button (let say - to execute some VFP code).
>
>Additional requirements:
>Need to be able to do Clear All and Close All but the button should not be affected. I know I can have a Menu Pad (or Bar) with this function (however after Set SysMenu to Default I will loose this custom Pad/Bar)
>Do not want to use ON KEY Label - the function should be accessible from the mouse (in the development environment)
>Should work with either VFP6 SP5 and VFP7
>
>Greetings, and any ideas - welcome!
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform