public sealed class GH_RibbonPanel : GH_RibbonContentBase, IGH_RibbonInteractiveObject, IComparable<GH_RibbonPanel>
Constructors
Fields
Region
Represents the entire region taken up by this object.
public Rectangle Region
Properties
ClientRegion
Gets the Client region of the layout. The client region as defined as the entire region minus the margin and the padding.
public Rectangle ClientRegion { get; set; }
ContentRegion
Gets or sets the Content region of the layout. The content region as defined as the entire region minus the margin.
public Rectangle ContentRegion { get; set; }
Name
#Gets or sets the name of the panel.
Remarks: Panels with names should render those as panel-bars.
Owner
#Gets or sets the owner control for this panel.
Remarks: If you supply a NULL value, you cannot call any interface methods
Value: The GH_RibbonPanel owner
Visible
Gets or sets visibility of this control. Typically visibility affects drawing and mouse interaction
Methods
AddItem
#Adds a new item to the content.
Remarks: If you don't call this method to add icons you must make sure the owner flag on the item is properly set.
Returns: True on success, false if the item is already referenced
CollapseLeastSignificantColumn
#Removes the rightmost column that features only Obscure items.
Returns: True if a column was collapsed, false if no snigle column with only Obscure items could be found.
CompareTo
#Contains
Tests to see if the given point is considered to be 'on' the control. By default, the content region of the control is tested, but derived classes can override this behaviour.
DesiredHeight
#Calculates the desired height of the panel based on a given height.
Remarks: The desired height is the nearest height that is comfortable for this panel. "Comfortable" being defined as minimum wasted space in the layout.
Returns: The nearest desired height.
DisplayDropdown
#DisplayDropdown
#public void DisplayDropdown()
PerformLayout
#Performs a tight-fit stacking of all content items. All items will be layed out and the panel Region will be adjusted to match.
public override void PerformLayout()
Overrides: GH_RibbonContentBase.PerformLayout
RemoveItem
#Removes an item from the content
Remarks: This will set the owner flag on the item to Null
Returns: True on success, false if the item iis not part of this panel