Questions? Feedback?powered byOlark live chat software
Bug 3683

IDE property settings for RibbonBar 17 January, 2020

René Ullrich
25 November, 2019
Product: PowerBuilder Category: Controls & UI
Version: 2019 R2 Beta Publishing: Public
Classification: Appeon bug Priority: P3
Status: Closed Reason: FIXED
Mark Lee 17 January, 2020
Hi René,

Yes, you are right.
Thank for your quick update. We will proceed to close this ticket.
You are welcome to open a new ticket if you have other issues.
Have a good day!

Regards,
Mark Lee
René Ullrich 17 January, 2020
Ok. I thought with autozize = true the height should automatically be the best height. But seems to calculate different.
Mark Lee 17 January, 2020
Hi René,
Yes, this is normal behavior. 
The value displayed in the first messagebox is not a GetBestHeight() height because the Font setting in the RibbonBar control in PB IDE is not the same as that in the import XML file.
The value displayed in the second messagebox is the GetBestHeight() function and it will get the height value, so they are defferent.
If the Font setting in the RibbonBar control in PB IDE is the same as that in the XML file, you will get the same value.

Regards,
Mark Lee
René Ullrich 17 January, 2020
Hi Mark,

issue 2: I can't see why it should be normal that the two messageboxes show different values. I don't change the Font settings between this two calls. So it is the same Ribbonbar with same settings but different heights?

Regards,
René
Mark Lee 16 January, 2020
Hi René,

Thanks for your quick update.
issue 1: This is the current design of RibbonBar. Perhaps it is a good way that we don't provide the Font settings in the XML, but it might not be comfortable for some of our other customers who might like this setting if we remove the Font setting. Anyway, We will transfer it to our product team for consideration.

issue 2:  We can reproduce it on our side. And yes, the messagebox shows different values. Even though they have the same size (12 pt), different system font (Tahoma and Wingdings) will still have a different default height in the system. So we think this is normal behavior as well.

Regards,
Mark Lee
René Ullrich 15 January, 2020
Hi Mark,

1. Ok. But I can't see why I can specify settings in the IDE, if the settings in the XML overrides it?
3. Yes, different Font settings should result in different height values. But I this Autosize and GetBestHeight should have the same values. But this is not always so. Autosize had the better value in my test case.

To reproduce:
- Ribbonbar-XML: Font Tahoma 12 pt
- Ribbonbar control: Font Wingdings 12 pt; Autosize = true
- Script (e.g. in button clicked; XML already loaded): 
MessageBox ("Autosizeheight", rbb_1.height)
rbb_1.Autosizeheight = false
rbb_1.height = rbb_1.GetBestHeight()
MessageBox ("GetBestHeight", rbb_1.height)
- run it: First and second Messagebox show different values but should have the same
Mark Lee 15 January, 2020
Hi René,
 
Thanks for retesting the PB 2019 R2 Beta!
1.   You are right, the settings in the XML overrides the settings in the IDE. We need to update the documentation.
2. Thanks for the confirmation that changing Facename at runtime works now.
3. For "The difference seems to depend on different Font settings in XML and IDE (Tahoma vs. Wingdings in my test)" issue, what you think is right. Different Font settings require different height values in the RibbonBar control.
4. For "The help menu topics for RibbonBar control events "clicked", "selected", "modified" and "selectionchanged" are in the help file" issue, we will transfer it to our documentation team for consideration.


BTW, since the Font changes bug was resolved, if you don't have other issues, we will close this ticket.
Thanks for taking your time & effort to test out the PB2019 R2 beta and provide us your valuable feedback again. 

Regards,
Mark Lee
Chris Pollach 13 January, 2020
Hi René;

   Thank you for your testing, observations and feedback. We will need some time to investigate the RibbonBar behaviour in more detail.

   I will now forward this ticket on to the main Support & Documentation teams for their review.

Regards ... Chris
René Ullrich 13 January, 2020
Tested with 2019 R2 build 2279 again.

Properties BuiltInTheme and Font may still specified in Ribbonbar XML and IDE. It seems that settings in the XML overrides the settings in the IDE. If this is expected behaviour please decribe it in the help file.

Changing Facename at runtime now works. 
FYI: It also works for me without changing the FontCharSet,

I also tested the new AutoSizeHeight and GetBestHeight functionality of Ribbonbar. 
AutoSizeHeight seems to work fine. I works if it was specified at design time and at runtime.
But GetBestHeight returns in some circumstances a value that is smaller than the height that AutoSizeHeight would set.
In my test case AutoSizeHeight sets the height to 540. If AutoSizeHeight = false the function GetBestHeight returns 508. This height is barely OK to display the RibbonBar but it ends directly below the Panel Texts with no gap. (Also different heights if Panel Text or Tab Headers are hidden or the Ribbonbar is minimized).
The difference seems to depend on different Font settings in XML and IDE (Tahoma vs. Wingdings in my test). With other combinations the heigths may be the same.

The help menu topics for RibbonBar control events "clicked", "selected", "modified" and "selectionchanged" are in the help file (unter "PowerScript events") but quite difficult to find. There should be links in "Ribbonbar control" topic to this pages. And there should be more information about the events in "Working with Ribbonbar".
Mark Lee 09 January, 2020
Hi René,

I am sorry to hear that. And yes, we have a new build PB 2019 R2 Beta.
You can download it a few days later and I will let you know when it is released.

Regards,
Mark Lee
René Ullrich 06 January, 2020
Hi Mark,
Also If I change the FontName and FontCharSet (I tried also to change FontPitch and FontFamily) at runtime the RibbonBar always shows the Font I set at design time.

(Maybe you have a newer Build? I have Build 2203)

Regards,
René
Mark Lee 05 January, 2020
Hi René,
 
After our deeper analysis, for the issue "it will change the Font in the Ribbonbar runtime mode dynamically", we found that when you change the FaceName Properties,  you also need to change the fontcharset. You can refer to the following code to work it around:
e.g. 
rbb_1.FaceName="Wingdings"
rbb_1.fontcharset=symbol!
or 
rbb_1.FaceName="Tahoma"
rbb_1.fontcharset=ansi!
You can also refer to the following link for details:
https://docs.appeon.com/appeon_online_help/pb2019/objects_and_controls/ch03s95.html
 
Character sets and font typefaces are related, so choosing the wrong character 
set can cause a different font to be used than the one expected.
 
BTW, please let us know if it resolves your problem. Thanks in advance.

Regards,
Mark Lee
Mark Lee 26 November, 2019
Hi René,

Thanks for the quick update.
And yes, I agree with your suggestion about defining the user events in the "RibbbonBar control" help. And our documentation team will enhance this description of it.
Thanks for your understanding. 

Regards,
Mark Lee
René Ullrich 26 November, 2019
Oh, I see there is already a resize event. :-)
René Ullrich 26 November, 2019
Hi Mark,
1. It would be nice to have an event to notify the application that the height of RibbonBar has changed especially if AutoSize is used. So the developer can adjust the position of other window controls.


3. With correct event parameters it works for me. Thank you!
It's not easy to find in the help how to define the events and what the parameters and return values are for.
I also don't understand why and how the clicked and selected events for Ribbon controls are defined under "Object and Controls Property Descriptions and Usage". There are also other controls that have "real" clicked or selected events (menus, buttons, ...) that are not mentioned here.
I think there should be a description how to define the user events in the "RibbonBar control" help.

Regards,
René
Mark Lee 26 November, 2019
Hi René,

Thanks for reporting this problem.
1. For the issue "If I change HideTabHeader or HidePanelText the height of control is adjusted. But none of these settings from IDE is used on Load at runtime if there are specified other values in the XML".
This is what it is designed to do and it will indeed make someone confused. So in our latest internal PB version (not Beta version 2203), we optimized it and you can avoid this problem because you cannot set the HideTabHeader or HidePanelText properties in the XML. You can only code setting the HideTabHeader or HidePanelText properties in PB Script. The new PB version will provide a new property: AutosizeHeight. When you check this property, the Ribbonbar will auto size height in PB IDE and runtime mode. We will also provide a new function GetBestHeight(), with this function, you can reset the Ribbonbar height value.
 
2. For the issue it will change the Font in the Ribbonbar runtime mode dynamically, we can reproduce it on our end and will do further research to figure it out. And we will keep you updated!
 
3. For the issue "None of the events that I specified in XML is triggered at runtime", if the user events are defined, please make sure the parameters and types for the events are correct. If one of these are lost, then the events won’t be triggered at runtime. 
You can refer to the following link for details: (or see comment 4)
https://docs.appeon.com/appeon_online_help/pb2019r2beta/pbug/ch13s03.html#_Important_notes
https://docs.appeon.com/appeon_online_help/pb2019r2beta/objects_and_controls/ch03s46.html

Regards,
Mark Lee
Mark Lee 26 November, 2019
ribbonbar event example
René Ullrich 26 November, 2019
Hi Chris,
Let me add one more problem I don't found a solution for.
I don't know how to specify the correct height of RibbonBar control. The correct height depends on settings like Font, HideTabHeader and HidePanelText. So I think the height should be adjusted at runtime automatically (in this case we need an event to adjust the position of other window controls) or a function that calculates the correct height to set it by script.
Thank you.
Chris Pollach 25 November, 2019
Hi René;

  Yes, some of these issue have already been raised in previous tickets. However, you have touched on a few more issues that need attention. Thanks for taking the time to test this area of the PB2019R2 beta new features!

  I will now transfer this ticket over to the main Support / Engineering team for their detailed review and recommendations for a fix.

Regards ... Chris
René Ullrich 25 November, 2019
One more thing: None of the events that I specified in XML is triggered at runtime. What I'm doing wrong?
René Ullrich 25 November, 2019
*Phenomenon:
I can specify Properties HideTabHeader, HidePanelText, BuiltInTheme and Font settings of new RibbonBar control at design time in the IDE. (I don't meen the RibbonBar designer!)
If I change HideTabHeader or HidePanelText the height of control is adjusted.
But none of these settings from IDE is used on Load at runtime if there are specified other values in the XML!
If this is expected behavior please describe it in the help file.

Changes on HideTabHeader, HidePanelText and BuiltInTheme at runtime after Load of XML are effective. 
But Font changes not! (e.g. rbb_1.FaceName = "Wingdings")
I think this is a bug!?
OS:
Windows 10 
Platform:
 
Database Type:
 
Database Version: