Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Placing Toolbar With MENU
Message
 
 
À
21/06/2013 13:47:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01576789
Message ID:
01576845
Vues:
33
If I understand correctly, both buttons should become disabled when you open a form. I think the most simple way to do this is if you place that code in the forms directory. Since you have a public variable to reference the tbrDesktop object you can do it this way:
In the Form's INIT write
tbrDesktop.SetAll("Enabled",.F.)
In the form's DESTROY write
tbrDesktop.SetAll("Enabled",.T.)
>Thanks it's working correctly, one more issue if you could guide.
>
>I am executing my entire application throgh a program GO.PRG. Inside GO.PRG I have wriiten,
>
>
>DO Variables
>DO ENVIRONMENT
>DO TOOLBAR.PRG
>DO MAIN.MPR && My main application starts from here
>
>
>As you suggested I got my toolbar and Menu as I wished, however now i want that Command buttons of the above toolbar gets Disabled when I select something from the menu item or Tool bar command button and should get enabled if My form on screen is released.
>
>What code would be ? Something like Myttoolbar.cmdbtn.enable=.F.
>
>Kinldy Guide
>
>
>
>
>>Try:
>>
>>
>>tbrDesktop = CREATEOBJ('mytoolbar')
>>tbrDesktop.DOCK(0)
>>tbrDesktop.SHOW()
>>
>>
>>>I have created a toolbar for my application and have kept command buttons on it.
>>>When I execute my program I get the position of my toolbar as shown in picture No. 1.
>>>
>>>However I need to have position of my toolbar as shown in picture No-2. I did it by dragging the tool bar over my menu. One could see a small Blue Line on the top of Command Button in picture-1. I want to avoid this and keep it like as shown in picture-2..
>>>
>>>Is it possible through my program only that from the initial only I get position of my toolbar as shown in picture-2. I tried to change DOCKposition=0, DOCKposition=-1, but it didn’t worked.
>>>
>>>Here is my code
>>>
>>>
>>>PUBLIC tbrDesktop
>>>tbrDesktop = CREATEOBJ('mytoolbar')
>>>tbrDesktop.SHOW
>>>
>>>DEFINE CLASS myToolBar  AS Toolbar
>>>ADD OBJECT btnTrial  AS CommandButton
>>>ADD OBJECT sep1      AS Separator
>>>ADD OBJECT btnExcel AS CommandButton
>>>   
>>>btnTrial.HEIGHT =32
>>>btnTrial.WIDTH = 32
>>>btnTrial.Picture='E:\Sanchar Reporter\20-06-13\Data\Graphics\A4 Size Trial.bmp.'
>>>btnTrial.Caption = ''
>>>
>>>
>>>btnExcel.HEIGHT =32
>>>btnExcel.WIDTH = 32
>>>btnExcel.Picture='E:\Sanchar Reporter\20-06-13\Data\Graphics\Frx2Any_Excel.bmp.'
>>>btnExcel.Caption = ''
>>>
>>>  
>>>LEFT = 1
>>>TOP = -20
>>>WIDTH = 125
>>>DOCKposition=0
>>>
>>>Caption=' '
>>>Controlbox=.F.
>>>dockable=.F.
>>>   
>>>   
>>>PROCEDURE btnTrial.CLICK
>>>DO FORM trialperiodselection.scx
>>>ENDPROC
>>>   
>>>PROCEDURE btnExcel.CLICK
>>>DO FORM trialperiodselection.scx
>>>ENDPROC
>>>
>>>ENDDEFINE
>>>
>>>
>>>
>>>Attached Picture1 and 2 are attached
>>>
>>>Any Idea ?
>>>
>>>
>>>
Christian Isberner
Software Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform