Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP6SP5 - Attach a copy of Toolbar onto the form
Message
De
29/05/2003 12:53:10
 
 
À
29/05/2003 01:25:18
Dorin Vasilescu
ALL Trans Romania
Arad, Roumanie
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00793356
Message ID:
00794016
Vues:
61
I just jumped in here and tried your code myself. Great code. Thanks for sharing!

>Try this code :
>
>
>PUBLIC oForm
>oForm = CREATEOBJECT('form1')
>oForm.visible = .t.
>
>
>**************************
>DEFINE CLASS form1 AS form
>	Height = 333
>	Width = 480
>	ShowWindow = 2
>	DoCreate = .T.
>	AutoCenter = .T.
>	Caption = "Form1"
>	toolbarref = .NULL.
>	Name = "Form1"
>
>	ADD OBJECT command1 AS commandbutton WITH ;
>		Top = 200, ;
>		Left = 290, ;
>		Height = 27, ;
>		Width = 84, ;
>		Caption = "Command1", ;
>	Name = "Command1"
>
>
>	ADD OBJECT command2 AS commandbutton WITH ;
>		Top = 200, ;
>		Left = 198, ;
>		Height = 27, ;
>		Width = 84, ;
>		Caption = "Command2", ;
>		Name = "Command2"
>
>	ADD OBJECT command3 AS commandbutton WITH ;
>		Top = 200, ;
>		Left = 106, ;
>		Height = 27, ;
>		Width = 84, ;
>		Caption = "Command3", ;
>	Name = "Command3"
>
>	ADD OBJECT text1 AS textbox WITH ;
>		Height = 23, ;
>		Left = 32, ;
>		Top = 28, ;
>		Width = 424, ;
>		Name = "Text1"
>
>	PROCEDURE Activate
>		IF  ISNULL(this.toolbarref)
>			this.ToolbarRef=CREATEOBJECT('MyToolbar')
>			this.ToolbarRef.Dock(0)   && or 1 , 2
>			this.ToolbarRef.visible = .t.
>		ENDIF
>	ENDPROC
>
>
>ENDDEFINE
>
>
>
>*********************************
>DEFINE CLASS mytoolbar AS toolbar
>	Caption = "Toolbar1"
>	Height = 28
>	Left = 0
>	Top = 0
>	Width = 99
>	ShowWindow = 1
>	Name = "mytoolbar"
>	ADD OBJECT command1 AS commandbutton WITH ;
>		Top = 3, ;
>		Left = 5, ;
>		Height = 22, ;
>		Width = 23, ;
>		Caption = "a", ;
>		Name = "Command1"
>	ADD OBJECT command2 AS commandbutton WITH ;
>		Top = 3, ;
>		Left = 27, ;
>		Height = 22, ;
>		Width = 23, ;
>		Caption = "b", ;
>		Name = "Command2"
>	ADD OBJECT command3 AS commandbutton WITH ;
>		Top = 3, ;
>		Left = 49, ;
>		Height = 22, ;
>		Width = 23, ;
>		Caption = "c", ;
>	Name = "Command3"
>	ADD OBJECT command4 AS commandbutton WITH ;
>		Top = 3, ;
>		Left = 71, ;
>		Height = 22, ;
>		Width = 23, ;
>		Caption = "d", ;
>		Name = "Command4"
>
>
>ENDDEFINE
>
>
>>Thats what I tried and no toolbar....
>>
>>:(
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform