Hi,
can I handle the event ACTIVATE or CLICK when I select a tab in ribbon bar? Example: when I select a specific tab my app show a specific tab of pageframe located into form.
Best regards
Gianluca
Action in selecion tab
Re: Action in selecion tab
Hi Gianluca
Not quite sure what you mean. Are you attaching the commabars to the screen and using the Office 2007 type Toolbars or are you attaching toolbars to a form which then has a pageframe on it. Either way you can drill down to the click event of the Ribbon Bar and then code a selection of a particular tab to activate that tab. What version of VFP are you using? can you the use the debugger to look at the form object to find the correct path to the tab, or alternativley from the command window use IntelliSense.
I.E. From the Screen "_Screen.ActiveForm.PageFrame1.Page3.Activate" from a Ribbon Bar attached to a form "ThisForm.PageFrame1.Page3.Activate"
Please supply some more information.
Peter
Not quite sure what you mean. Are you attaching the commabars to the screen and using the Office 2007 type Toolbars or are you attaching toolbars to a form which then has a pageframe on it. Either way you can drill down to the click event of the Ribbon Bar and then code a selection of a particular tab to activate that tab. What version of VFP are you using? can you the use the debugger to look at the form object to find the correct path to the tab, or alternativley from the command window use IntelliSense.
I.E. From the Screen "_Screen.ActiveForm.PageFrame1.Page3.Activate" from a Ribbon Bar attached to a form "ThisForm.PageFrame1.Page3.Activate"
Please supply some more information.
Peter
Re: Action in selecion tab
OnTabChanged event of the Ribbon fires when active tab is changed. Parameter of this event is the index of the selected/active tab. Index specifies the index of the tab in the Tabs collection: 1 - first tab, 2 - second, and so on...
In addition, there is OnTabChanging event, parameter is the index of the tab to be selected. Event fires when the active tab is about to be changed. To prevent active tab to be changed, return False. For example:
See also ActiveTab property of the Ribbon, similar to the ActivePage property of VFP PageFrame class.
To change active tab programmatically, for example, select first tab:
Please note: OnActiveTabChanged and OnTabSelected events are obsolete and will be removed.
Code: Select all
*** OnTabChanged event
LParameters tnTabIndex
...
&& ThisForm.PageFrame1.ActivePage = m.tnTabIndex
Code: Select all
*** OnTabChanging event
LParameters tnNewTabIndex
If <<ActiveTabShouldNotChang>>
Return .F.
EndIf
To change active tab programmatically, for example, select first tab:
Code: Select all
Ribbon.ActiveTab = 1
Please note: OnActiveTabChanged and OnTabSelected events are obsolete and will be removed.
With best regards,
Alex Grigorjev
(ARG-Software Design Lab.)
Alex Grigorjev
(ARG-Software Design Lab.)
Re: Action in selecion tab
Hi Alex,
work fine... thanks
Gianluca
work fine... thanks
Gianluca