News and Hints - harborsiem/WindowsRibbon GitHub Wiki
Useful Links
Microsoft Windows Ribbon Framework
Table of Content for Documentation
Windows Ribbon Framework for Delphi From this page you can get a very good tutorial for the Ribbon.
When using ApplicationModes to a Tab or Group then you should define ApplicationMode to all Tabs and Groups in the RibbonMarkup.xml. If you don't do this you can get an Application shutdown when switching the ApplicationMode.
In the Ribbon controls classes RibbonButton, RibbonComboBox etc. you have different properties dependent to the control. Some of these properties you can define in the markup at a Command. Following table will show the property names in markup and in the control classes.
Markup | Control class |
---|---|
LabelTitle | Label |
LabelDescription | LabelDescription |
TooltipTitle | ToolTipTitle |
TooltipDescription | ToolTipDescription |
Keytip | Keytip |
Command.SmallImages | SmallImage |
Command.LargeImages | LargeImage |
Command.SmallHighContrastImages | SmallHighContrastImage |
Command.LargeHighContrastImages | LargeHighContrastImage |
!Note:
If you define these properties in markup, you can't read the values in the code behind of the control classes.
If you want to write the listed properties in the code behind, it is recommended that you don't specify the values in the markup. You can do it in the Load event of the Form or later on. In this case it is possible to read the values in code behind.
For some Ribbon Controls there are line breaks possible for the Properties LabelTitle (Label), LabelDescription, TooltipTitle and TooltipDescription. You can set a line break in the markup by a Text Editor, in the code behind or since RibbonTools version 1.3.7 also in the RibbonTools.
In the following example we have defined a Command for a RibbonButton with the name "ButtonHeatCurve". In Code behind you can write:
ButtonHeatCurve.TooltipDescription = "Heating" + (char)0xa + "Curve";
In Xml markup you can write this with a text editor to the TooltipDescription:
Heating
Curve
In RibbonTools you write to TooltipDescription:
Heating\nCurve
You can try to use a ComboBox with the Markup Property IsEditable="true"
You can try to use a Button with the "Extra Label" in the Markup Property Label. In Code behind you have to set this Button Property Enabled = false. See Samples\CS\Mainform, Tab "Page Layout", Group3, Button cmdButtonLabel. Also have a look to the Size Definition in Group3.
Hints for special visual design with "Hidden Buttons" in the Ribbon
See Samples\CS\Mainform, Tab "Page Layout", Group1, Group2, Group4. Also have a look to the Markup element Size Definition in the Groups.
All Ribbon Controls like RibbonButton now have a free Tag Property with the type Object. You can use it like you want.
There is also a new Property CommandType with the enum type RibbonLib.Interop.CommandType. This property is set by the Framework when the Framework uses this Ribbon Control in the view.
Since Ribbon V2.15.0 there is a Name property. This can be set by user after instantiation. This maybe helpful for debugging.
MDI is not supported by the Windows Ribbon framework directly. See an older: MDI support, commented by a Microsoft employee.
But the only thing I know is, that one can't use the Maximize Button or a WindowState.Maximized property in the MDI Forms. If one want a maximized MDI Form inside the Mainform, you have to do extra effort for sizing the MDI Form.
Alternatively, one can use a TabControl with some effort for closing, hiding, .... If there are other ideas you're welcome to write an issue or discussion
For the LabelTitle (Label) property you should set a Line break as last character. This will avoid an extra Line break for the last character in the Label text. See also, Hints for Line breaks in String-Properties in this document.
Todo ?