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.

ParameterDescription
OwnerwindowSpecifies 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.
CtrlentIDContains 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.
TypeoverrideUsed 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.

FieldDescription
ColThe 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.
RowThe 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.
WidthThe width (in pixels) of the edit box that will display the AppNote. Default is 350.
HeightThe height (in pixels) of the edit box that will display the AppNote. Default is 200.
ReadonlyFlag 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.
FontThe font to be used in the edit box. See the FONT property.
BkcolorBackground 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.)
FgcolorForeground color of the text in the edit box. Uses the same argument style as bkcolor.
JustificationText justification in the edit box. "L" - Left, "R" - Right, or "C" - Center.
TitleTitle to be displayed in the caption bar.
TextThe text of the QuickHelp. Carriage return line feeds (\0D0A\ in BASIC+) must first be converted to @VM (value marks).
ScrollFlag 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

Msg()Popup()

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
  • No labels