Skip to content

menu GetDef

menu GetDef {key}
Sets
#MenuRes

Also searchable as: menu GetDef · default · defaults

New controls take their font, colours, alignment and parent from a set of defaults. menu GetDef puts one of them into #MenuRes; menu SetDef changes them.

Key What it is Set too by
alignment 0 left, 1 right, 2 centre menu Font Align
color Background colour menu Font BgColor
fontcolor Text colour menu Font Color
fontname Font menu Font Name
fontsize Font size in points menu Font Size
fontstyle Sum of 1 bold, 2 italic, 4 underline, 8 strike-out menu Font Style
parent Name of the window or panel new controls go into menu Form, menu Panel

When a script starts, and after menu Clear, they are Arial 10, plain, black text on the standard button colour (-16777201), aligned left, in form0, the main window.

menu GetDef fontname
set %font #MenuRes
menu GetDef fontsize
display ok New controls use %font #MenuRes
halt
  • parent after the default window or panel was deleted gives the last text any menu GetProp or menu GetDef returned: the default parent is then none, and new controls do not appear until menu SetDef parent names one.

See also

The EasyUO 1.6 behaviour on this page was researched with help from the ScriptUO community: Gaderian's tutorial New Menu Code and how to adapt old scripts and the scripts its members share at scriptuo.com.