Resolved Ribbonbar ...
- How-to
- Vladimir K.
- PowerBuilder
- Tuesday, 28 April 2020 01:02 PM UTC
Hi all.
Trying to get a feel of it, so:
step #1
Open Ribbon bar builder
Open default template
Save default template as 123.xml in working directory: c:\pb
step 2
open current frame window for an application (mdihelp!)
left existing menu without change
Insert-> Control-> Ribbonbar
left default name for it as rbb_1
step 3
in open event for frame window, i added:
int i_rc
i_rc = rbb_1.ImportFromXMLFile ("C:\pb\123.xml")
messagebox('', 'importfromxml=' + string(i_rc))
step 4
in resize event for frame window i added:
//resize RibbonBar
rbb_1.move(0, newheight - this.workspaceheight() )
rbb_1.width = newwidth
//resize mdi_1 based on RibbonBar
this.move (0, rbb_1.height + newheight - this.workspaceheight())
this.resize (newwidth, newheight - rbb_1.height - ( newheight - this.workspaceheight()))
step 5
in 123.xml:
/*
...
<Menu>
<Item Text="Employees" PictureName="EmployeeSmall!" Checked="false" Enabled="true" Tag="Employees" Type="0" Visible="true" Clicked="ue_MenuEmployeesClicked" Selected="ue_MenuEmployeesSelected" />
...
*/
step 6
for a rbb_1, created 2 user events:
ue_MenuEmployeesClicked
and
ue_MenuEmployeesSelected
with fallowing code in each one:
messagebox('', 'Clicked')
and
messagebox('', 'Selected')
step 7
see attached
i was expecting to see messagebox when i click or select employee button, nothing happen.
Did i miss a step?
Help will be greatly appreciated.
Thank you
Sincerely
Vlad
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.