HeaderBar: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Brendon (talk | contribs)
No edit summary
Line 5: Line 5:
== Description ==
== Description ==


The HeaderBar control displays a title and optional left and right buttons at the top of the form. Buttons can be text, an icon or both. When clicked, <HeaderBarID>_onclick(''choice'') is called. The name of the button which is called is in choice.
The HeaderBar control displays a title and optional left and right buttons at the top of the form. Buttons can be text, an icon or both. When clicked, <HeaderBarID>_onclick(''choice'') is called. The name of the button which is called is in ''choice''. If you have an icon with no name as a button, the name of the icon will be passed.


To add a control to your app, choose the control’s icon in the Toolbar, then position it on the Design Screen. Use the Property Editor to set the properties you need, then add functions to your code to respond to the events that come from the control: usually, just onclick.
To add a control to your app, choose the control’s icon in the Toolbar, then position it on the Design Screen. Use the Property Editor to set the properties you need, then add functions to your code to respond to the events that come from the control: usually, just onclick.

Revision as of 10:42, 29 October 2012

jQuery

Description

The HeaderBar control displays a title and optional left and right buttons at the top of the form. Buttons can be text, an icon or both. When clicked, <HeaderBarID>_onclick(choice) is called. The name of the button which is called is in choice. If you have an icon with no name as a button, the name of the icon will be passed.

To add a control to your app, choose the control’s icon in the Toolbar, then position it on the Design Screen. Use the Property Editor to set the properties you need, then add functions to your code to respond to the events that come from the control: usually, just onclick.

To be safe, leave a bit of space under the HeaderBar. Its height differs from device to device.

Properties

Standard properties are supported, plus:

leftButtonIcon Names of icon for left button. Use false for no icon, or alert, arrow-d, arrow-l ,arrow-r, arrow-u ,back, check, delete, forward, gear, grid, home, info, minus, plus, refresh, search, star. Design time only.
leftButtonName The name of the left icon. Design time only.
rightButtonIcon Names of icon for right button. Use false for no icon, or alert, arrow-d, arrow-l ,arrow-r, arrow-u ,back, check, delete, forward, gear, grid, home, info, minus, plus, refresh, search, star. Design time only.
rightButtonName The name of the right icon. Design time only.
title The title which appears in the center of the bar. Design time only.

Events

Standard events are supported.

Example

Function HeaderBar1_onclick(button)
  MsgBox "Button '" & button & "' clicked."
End Function

Output

(message box showing “Button ‘left’ clicked.”)