Header: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Created page with "file:Header.jpg == Description == The Header control puts a simple header at the top of the screen. == Properties == Standard properties ar..."
 
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[file:Header.jpg]]
[[file:Header.png]]


== Description ==
== Description ==


The Header control puts a simple header at the top of the screen.
The Header control puts a simple header at the top of the screen. It also acts as a container, which means other controls, like buttons, can be dragged and dropped into it.


You can make a Header into a footer by setting bottom to 0 and putting "position:absolute;" into style.


== Properties ==
== Properties ==
Line 11: Line 12:
{| class="wikitable"
{| class="wikitable"
|-
|-
| innerHTML || The text of the title as plain text. Design time and runtime.
| addChild(''control'') || ''control'' is added to the Header. Runtime.
|-
| Header1.childNodes[1].textContent || The text of the title as plain text. Runtime.
|-
|-
| textContent || The text of the title as plain text. Design time.
| textContent || The text of the title as plain text. Design time.
Line 19: Line 22:


Standard [[events|events]] are supported. However, events are not usually associated with the control.
Standard [[events|events]] are supported. However, events are not usually associated with the control.
== Example ==


== Example (Basic) ==
<tabber>
<pre>
JavaScript=
<syntaxhighlight lang="JavaScript">
Header1.onclick = function() {
    NSB.MsgBox("Header clicked!");
};
</syntaxhighlight>
|-|
BASIC=
<syntaxhighlight lang="vb.net">
Function Header1_onclick()
Function Header1_onclick()
   MsgBox "Header clicked!"
   MsgBox "Header clicked!"
End Function
End Function
</pre>
</syntaxhighlight>
 
</tabber>
== Example (JavaScript) ==
 
<pre>
Header1.onclick = function() {
    NSB.MsgBox("Header clicked!");
};
</pre>
 


[[Category:Language Reference]]
[[Category:Language Reference]]
Line 41: Line 45:


[[Category:General]]
[[Category:General]]
[[Category:Common]]

Latest revision as of 15:43, 24 July 2019

Description

The Header control puts a simple header at the top of the screen. It also acts as a container, which means other controls, like buttons, can be dragged and dropped into it.

You can make a Header into a footer by setting bottom to 0 and putting "position:absolute;" into style.

Properties

Standard properties are supported, plus:

addChild(control) control is added to the Header. Runtime.
Header1.childNodes[1].textContent The text of the title as plain text. Runtime.
textContent The text of the title as plain text. Design time.

Events

Standard events are supported. However, events are not usually associated with the control.

Example

Header1.onclick = function() {
    NSB.MsgBox("Header clicked!");
};

Function Header1_onclick()
  MsgBox "Header clicked!"
End Function