Description
Used to display QuickHelp built using the QuickHelp Designer in the User Interface Workspace. AppNotes are typically used from event handlers.
Syntax
AppNote(ownerwindow, ctrlentID, typeoverride)
Parameters
The AppNote subroutine has the following parameters.
Parameter | Description |
---|---|
Ownerwindow | Specifies the name of the window from which to display the QuickHelp. If AppNote is not called from an event handler, this argument should be null. |
CtrlentID | Contains the name of the control that the QuickHelp is bound to (for example, MyWindow.Button_1). If this argument is null, then the entity will not be created/modified. This argument is passed to all event handlers as is, and therefore does not need to be constructed. |
Typeoverride | Used to override items in the QuickHelp repository record. |
You can display QuickHelp from your code, or you can execute QuickHelp that exists as a repository entity ¾ refer to the code examples later in this command description. The easiest way to use QuickHelp is through Quick Events in the Form Designer
The structure of an AppNote record is as follows.
Field | Description |
---|---|
Col | The X position (in pixels) of the AppNote relative to the calling window. If set to -1, the AppNote will center itself in the calling window. If set to -2, the AppNote will center itself on the screen. The default is –1. |
Row | The Y position (in pixels) of the AppNote relative to it calling window. If set to -1, the AppNote will center itself in the calling window. If set to -2, the AppNote will center itself on the screen. The default is –1. |
Width | The width (in pixels) of the edit box that will display the AppNote. Default is 350. |
Height | The height (in pixels) of the edit box that will display the AppNote. Default is 200. |
Readonly | Flag specifying this is a read only note. 1 = readonly, 0 = modifiable. A read only note will only have an OK button, while a modifiable note will have an OK button as well as a CANCEL button, to allow for backing out of a modification. Default is 0. |
Font | The font to be used in the edit box. See the FONT property. |
Bkcolor | Background color of the edit box. An RGB @VM-delimited list is used. (For example 255:@VM:0:@VM:0 is red, 0:@VM:255:@VM:0 is green.) |
Fgcolor | Foreground color of the text in the edit box. Uses the same argument style as bkcolor. |
Justification | Text justification in the edit box. "L" - Left, "R" - Right, or "C" - Center. |
Title | Title to be displayed in the caption bar. |
Text | The text of the QuickHelp. Carriage return line feeds (\0D0A\ in BASIC+) must first be converted to @VM (value marks). |
Scroll | Flag specifying whether or not scrolling is allowed. If no scrolling is allowed, then input cannot be longer than what is allowed in the window. Value should be 1 (allow scrolling), or 0 (do not allow scrolling). |
See also
Example 1
*Calling AppNote directly from an event script. Declare Subroutine AppNote Declare Function Get_Property, Repository, entid $insert Appnote_Equates AppRec="" AppRec<ACOL$> = -2 AppRec<AROW$> = -2 AppRec<AFGCOLOR$> = 0:@VM:0:@VM:255 AppRec<ATITLE$>="App Note Test" AppRec<ATEXT$>="This displays a HelpNote from your code." PARENT Get_Property(ctrlentID, "PARENT") AppNote(PARENT, ctrlentID, AppRec)
Example 2
* Executing an AppNote entity. Declare Subroutine AppNote, Repository Declare Function Repository, entid ID = entid("CARPARTS","AppNote","",ctrlentID) PARENT = Get_Property(ctrlentID, "PARENT") * attempt to execute AppNote Success = Repository("EXECUTE", ID, PARENT, "") * If AppNote not in Repository, make one and execute it. If (Success) Else Repository("WRITE" , ID, "", 1, 1, "", "", "", "", "",| "HelpNote", "") Repository("EXECUTE", ID, PARENT, "") End