Footerbar: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Brendon (talk | contribs)
Created page with "file:FooterBar.jpg '''Description''' The FooterBar control puts up to 5 buttons on the bottom of the form. Buttons can be text, an icon or both. When clicked, <FooterBar..."
 
Brendon (talk | contribs)
No edit summary
Line 3: Line 3:
'''Description'''
'''Description'''


The FooterBar control puts up to 5 buttons on the bottom of the form. Buttons can be text, an icon or both. When clicked, <FooterBarID>_onclick(choice) is called. The name of the button which is called is in choice.
The FooterBar control puts up to 5 buttons on the bottom of the form. Buttons can be text, an icon or both. When clicked, <FooterBarID>_onclick(''choice'') is called. The name of the button which is called is in ''choice''.


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.
Line 9: Line 9:
'''Properties and Methods'''
'''Properties and Methods'''


Standard properties are supported (“Properties")
Standard [[properties|properties]] are supported, plus:
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 23: Line 23:
'''Events'''
'''Events'''


Standard events are supported.
Standard [[events|events]] are supported.


'''Example'''
'''Example'''

Revision as of 22:27, 24 July 2012

Description

The FooterBar control puts up to 5 buttons on the bottom of the form. Buttons can be text, an icon or both. When clicked, <FooterBarID>_onclick(choice) is called. The name of the button which is called is in choice.

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.

Properties and Methods

Standard properties are supported, plus:

items A list of names for the buttons, comma separated.
iconPos The position of the icon. Can be none, top, bottom, left, right or notext.
icons Names of icons for each button. 18 to choose from: alert, arrow-d, arrow-l ,arrow-r, arrow-u ,back, check, delete, forward, gear, grid, home, info, minus, plus, refresh, search, star.
.refresh() Runtime function. Call this after you display a new form with a FooterBar.

Events

Standard events are supported.

Example

Function FooterBar1_onclick(choice)
  If TypeName(choice)="object" Then Exit Function
  MsgBox "Button is " & choice
End Function
FooterBar1.refresh()

Output

(message box showing “Button is Gear” for the 4th button.)