This control has been developed according to Microsoft Office 2003 controls. Most of the properties are included. However, there is no support yet for the "Design Time" property. This control contains five sub-controls:
- Title: This section is at the top of the control. The property describes the control and is also the visible control indicated on the button.
- Title explanation: This section is under the title info, which should hold long info rather than the title info. If the title was not defined, this control uses the title. Visible control is indicated on the button.
- Related control: This control shows when the button is selected and is not moveable. This property has to indicate on the control when the control is added. Furthermore, this control is shown on the button. If this control was not added on the button, the control will shown only a panel.
- Buttons: This object is dependent on the control. Almost all properties are contained in this control.
- Carrying panel: The buttons can add onto the carrying panel. If this situation is not possible, the buttons will be added on the menu.
NavigateBar Control
This navigate bar must be used in a carrier panel. It will be deployed on the included control. All of the controls specified above come up within this control. Briefly:
Properties
NavigateBarButtons
: Collection that carriesNavigateBarButton
controls. New button can be added here.NavigateBarButtonHeight
: Every new button uses this value for height info.NavigateBarDisplayedButtonCount
: Maximum number of buttons can be added on the panel. Default is all buttons if it is not set.SelectedButton
: Holds selected or picked-out button info.NavigateBarColorTable
: Contains color settings for Panel and Sub-controls. System defaults valid when undefined. It is possible to customize.SaveAndRestoreSettings
: Each application saving a different location. For save and restore, you must setNavigateBarButton.KEY
values. Default settings result in file saves in XML file format in the %APPDATA%\AppExeFileName folder. You can set any disk location and file name.IsCollapsible
: Is it a collapsible pane? Default istrue
.IsShowCollapseButton
: Show collapse button on the caption band.IsCollapsedMode
: Get collapsible mode state.IsShowCollapsibleScreen
: If pane width is smaller than minimum size, is it displayed as a collapsible screen?IsUseRTLforButtons
: UseRightToLeft
for buttons.IsUseRTLforMenus
: UseRightToLeft
for context menus.IsCollapsibleScreenShowNow
: Is it displayed as a collapsible screen?IsCollapseScreenShowOnButtonSelect
: Is it shown as a collapsible screen when button is clicked?CollapsibleScreenWidth
: Collapsible screen width.CollapsibleWidth
: Required panel width for collapsible mode.RelatedControl
: IfButton.RelatedControl
is empty, then display this control.OverFlowPanelHeight
:Get
orSet
overflow panel height.DisplayedButtonCount
:Get
orSet
displayed button count in panel.AlwaysUseSystemColors
:Get
orSet
; if always use system colors, set astrue
.
Methods
ChangeCollapseMode
: If collapsible, then changes the collapse mode.ChangeButtonPosition
: Sets new position in panel and collection for button.ShowCollapseScreen
: If collapsed mode, then shows collapse screen.HideCollapseScreen
: If collapsed mode, then hides collapse screen.RunMenuOptionsDialog
: OpenNavigatebar
"Menu Option" form.
Events
OnNavigateBarButtonHeightChanged
: Triggers when button height is changed. Displays old and new values.OnNavigateBarButtonAdded
: Triggers when new button is added. Displays new button's info.OnNavigateBarButtonRemoved
: Triggers when existing button is removed. Displays removed button's info.OnNavigateBarButtonSelecting
: Triggers when a button is selecting.OnNavigateBarButtonSelected
: Triggers when a button is selected. Displays selected button's info.OnNavigateBarDisplayedButtonCountChanged
: Triggers when displayed button count is changed.OnNavigateBarCollapseModeChanged
: Triggers when collapse mode is changed.OnNavigateBarColorChanged
: Triggers when the color table is changed.
NavigateBarButton Control
This contains the button info that is added into the panel. The button is the main object of control and almost all properties are saved on it. Briefly:
Properties
Caption
: This is the text info on the button and also its panel title. It will also be used forToolTipText
ifToolTipText
has not been set.CaptionDescription
: Description of the panel title.RelatedControl
: The control that displays on the panel when the button is selected. Panel with notification message will display when it is undefined.Key
: Each one is a unique value in the collection. This value is used for save and restore.Image
: Holds picture info. 24x24 size is recommended. This picture will be used when it is disabled. It is an alternative to use. When this picture does not exist, one default picture will be added inOverFlowPanel
.MouseOverImage
: Picture info when mouse points on it. Image info will be used when it is undefined.SelectedImage
: Picture info when it is selected. Image info will be used when it is undefined.IsSelected
: Saves if button is selected or not.IsDisplayed
: Saves if button display is in the panel or not.IsAlwaysDisplayed
: Don't change theIsDisplayed
state. Always showsNavigateBarButton
.IsShowCaption
: Saves display of title on panel or not when the button selected.IsShowCaptionDescription
: Sets display of panel description when the button is selected.Font
: Button's font info.ForeColor
: Button's font color info.ToolTipText
: The text info that is shown when button and overflow panel are not big enough.DefaultButtonHeight
: Button's default height info. Defined as static.MinimumButtonHeight
: Minimum height info that the button can have. Defined asstatic
.CollapsedScreenWidth
: Collapse screen width for this button.IsShowCollapseScreenCaption
: Show caption band on collapse screen.
Methods
PerformClick
: Run button's selected event manually.
Events
OnNavigateBarButtonSelected
: Triggers when a button is selected. First, it kicks off here and then kicks off the part in the mainNavigationBar
.OnNavigateBarButtonCaptionChanged
: Triggers when the button title info is changed. Displays old and new values.OnNavigateBarButtonCaptionDescriptionChanged
: Triggers when the button title description info is changed. Displays old and new values.OnNavigateBarButtonDisplayChanged
: Triggers when the button's display settings info in the panel is changed. Displays old and new values.
Using the Code
History
- 11.07.2007: Version 2.6.4
- Added: If deactivate or change application, close collapse screen.
- Improved: Collapse screen show method.
- Fixed: Splitter resize problem.
- 08.31.2007: Version 2.6.3
- Improved: Collapse button click.
- Removed: Unused methods from NavigateBarHelpers.cs.
- Fixed: If unsave setting, then changing button position.
- Fixed: Button's right click menu closing, then paint.
0 Comments:
Đăng nhận xét