Uniface Underground -> Undocumented.Features.Only. Go Home

$formpanel and $applpanel

 
Name $formpanel and $applpanel
Set/Update uniface panels
Synopsis $formpanel and $applpanel
Use Allowed in form components.
Description In fact, $formpanel is an associative list (of lists) where items represent buttons or separators.

An example :
$list$ = "TYPE=OPR·!·;ID=accept·!·;REF=u_accept·;TYPE=MIS·!·;ID=separator·;TYPE=OPR·!·;ID=operation·!·;REF=glyph"
$formpanel = $list$

We only know 2 types of items which represent buttons or separators : OPR and MIS and ATT.

For OPR type, the ID item is the name of the operation fired by the button , and REF is the glyph associated to the button.
That is, the item "TYPE=OPR.;ID=accept.;REF=u_accept" is the first button since it's the first item.

For MIS type, We only know ID=separator. This item creates an "empty" space between 2 successive buttons in the panel

Updated at 23-mar-2005

"ATT=Disable" dims the button. "ATT=Check" allows clicking. $applpanel is exactly the same except that it refers to the application panel (on the main window) instead of the one on your form.

Set $formpanel example:

entry SETFORMPANEL
variables
String BTNDEF,PANELDEF
endvariables

putitem/id BTNDEF, "TYPE", "OPR"
putitem/id BTNDEF, "ID", "Start" ; i.e the name of the operation (must exist!)
putitem/id BTNDEF, "REF", "U_START" ; Glyph & Message (for tooltip)
putitem PANELDEF, -1, BTNDEF

BTNDEF = ""
putitem/id BTNDEF, "TYPE", "MIS"
putitem/id BTNDEF, "ID", "Separator"
putitem PANELDEF, -1, BTNDEF

BTNDEF = ""
putitem/id BTNDEF, "TYPE", "OPR"
putitem/id BTNDEF, "ID", "Visible"
putitem/id BTNDEF, "REF", "U_VISIBLE"
putitem/id BTNDEF, "ATT", "Check"
putitem PANELDEF, -1, BTNDEF

BTNDEF = ""
putitem/id BTNDEF, "TYPE", "OPR"
putitem/id BTNDEF, "ID", "Stop"
putitem/id BTNDEF, "REF", "U_STOP"
putitem/id BTNDEF, "ATT", "Disable"
putitem PANELDEF, -1, BTNDEF

$formpanel = PANELDEF

end

Tested in 7.2.06 and 8.4

Note: Refer to Proc Language Manual section 1.12.3 Lists of items for information about the structure of lists.

Updated Oct/2005 ;======================================================
; $formpanel : Sets formpanel Dynamically
; $applpanel : Sets applicationpanel Dynamically
;======================================================

putitem/id ButtonDef, "TYPE", "OPR" ; Operation
putitem/id ButtonDef, "ID", "MyOper_1" ; Name op operation
putitem/id ButtonDef, "REF", "TEMP_1" ; Refers to Shortcut in Ini-file
; putitem/id ButtonDef, "ATT", "Disable" ; Disables the button
putitem PanelDef , -1, ButtonDef

putitem/id ButtonDef, "TYPE", "MIS" ;
putitem/id ButtonDef, "ID", "separator" ; separator
putitem PanelDef , -1, ButtonDef

putitem/id ButtonDef, "TYPE", "OPR" ; Operation
putitem/id ButtonDef, "ID", "MyOper_2" ; Name op operation
putitem/id ButtonDef, "REF", "TEMP_2" ; Refers to Shortcut in Ini-file
putitem/id ButtonDef, "ATT", "Disable" ; Disables the button
putitem PanelDef , -1, ButtonDef

putitem/id ButtonDef, "TYPE", "MIS" ;
putitem/id ButtonDef, "ID", "newline" ; next line
putitem PanelDef , -1, ButtonDef

putitem/id ButtonDef, "TYPE", "OPR" ; Operation
putitem/id ButtonDef, "ID", "MyOper_3" ; Name op operation
putitem/id ButtonDef, "REF", "TEMP_3" ; Refers to Shortcut in Ini-file
putitem/id ButtonDef, "ATT", "Disable" ; Disables the button
putitem PanelDef , -1, ButtonDef

$formpanel = PanelDef ;sets formpanel
; udbg_start=Shift+Ctrl+G
$applpanel = PanelDef ;sets applicatin panel


; In your Inifile
; add a line to create keyboard shortcut
; TEMP_1=Shift+Ctrl+t

; In <OPER>
; Add operations for MyOper_1; MyOper_2; MyOper_3
; for execution of code

; In Glyphs
; Add glyphs with names TEMP_1; TEMP_2; TEMP_3
; These images will appear on the buttons

; $formpanel and $applpanel can be set all the time
; to reflect changes in your form / application

;======================================================
; Introduced in U7204
; Works in U7205/ U7206/ U8.x U9.x
; Used in Uniface Debugger, so little hazard when using
; $formpanel documented in BUG: 24228 Solved in 8.2.02
;======================================================


Copyright © 1999-2005 $UUU  All rights reserved.
Disclaimer. | Site Comments.