Hi !
Please tell me, is it possible to change the font size for the POPUP() operator ?
Setting the system font size:
System{Prop:FontSize} = AnyFont:FontSize
x# = POPUP('Moe|Larry|Curly')
the issue is not resolved.
Thanks for the ideas!
Hi !
Please tell me, is it possible to change the font size for the POPUP() operator ?
Setting the system font size:
System{Prop:FontSize} = AnyFont:FontSize
x# = POPUP('Moe|Larry|Curly')
the issue is not resolved.
Thanks for the ideas!
Maybe this does it?..
Also discussed here, with possible solutionβ¦
Thanks ! The code provided by KreatoR solves my question.
x# = PopUp('[' & Prop:FontSize & '(' & 10 & ')]Moe|' & |
'[' & Prop:FontSize & '(' & 20 & ')]Larry|' & |
'[' & Prop:FontSize & '(' & 30 & ')]Curly')
But it is unclear to me where the secret knowledge on setting font parameters for PopUp() menu items was taken. This information is not in the helpβ¦
Not to mention might it be set once in a popup class for an application.
This is different.
And in the example of Mark Goldberg, everything is clear to me.
But where the KreatoR settings come from is generally unclear β¦
> But it is unclear to me where the secret knowledge on setting font parameters for PopUp() menu items was taken. This information is not in the helpβ¦
Here are some lines from the online help:
Within the selections string, each choice in the popup menu must be delimited by a vertical bar (|) character. The following rules apply:
β’ A set of vertical bars containing only a hyphen (|-|) defines a separator between groups of menu choices.
β’ A menu choice immediately preceded by a tilde (~) is disabled (it appears dimmed out in the popup menu).
β’ A menu choice immediately preceded by a plus sign (+) appears with a check mark to its left in the popup menu.
β’ A menu choice immediately preceded by a minus sign (-) appears without a check mark to its left in the popup menu.
β’ A menu choice immediately followed by a set of choices contained within curly braces (|SubMenu{{SubChoice 1|SubChoice 2}|) defines a sub-menu within the popup menu (the two beginning curly braces are required by the compiler to differentiate your sub-menu from a string repeat count).
β’ You may use the ASCII tab character (<9>) in your selection string to right-align text.
β’ You may modify the size and font of the popup menu using the following properties:
POPUP(β[β& PROP:FontSize &β(16)]I am 16 point β & |
β|[β& PROP:FontName &β(Arial),β& PROP:FontSize & |
β(16)]I am 16 Pt Arial β & β|[β& PROP:FontName &β(Arial),|
β& PROP:FontSize &β(16),β& PROP:FontStyle &β(β& Font:Bold &'),|
β& PROP:FontColor &|
β(β& COLOR:Blue &β)]I am 16 Pt Arial Bold Blue β & ββ)
β’ You may specify an icon for the menu item by preceding the menu choice with square brackets enclosing PROP:Icon and the name of the icon file in parens, like this:
POPUP(β[β & PROP:Icon & β(MyIco.ICO)]MenuChoiceβ)
Each menu selection is numbered in ascending sequence according to its position within the selections string, beginning with one (1). Separators and selections that call a sub-menu are not included in the numbering sequence (which makes an EXECUTE structure the most efficient code structure to use with this procedure). When the user CLICKS or presses ENTER on a choice, the procedure terminates, returning the position number of the selected menu item.
Thank you.
This is probably a fragment from the βoldβ C63 help.
Because this example is no longer in the C11.1 help.
In the C11.1 help they completely removed the following sentence and the example of Prop:Fontxxx usage
You may modify the size and font of the popup menu using the following properties
Instead they suggest to use IMenuStyle interface, no example at all.
No comment.
This was written by Mark Goldberg
Global Includes
INCLUDE('CWINT.int'),ONCE
Before CODE i.e. DATA
MenuStyle &IMenuStyle
FontProps &IFontProperties
FontName CSTRING('Microsoft Sans Serif')
After CODE before opening window.
MenuStyle &= (SYSTEM{PROP:MenuStyle})
FontProps &= MenuStyle.MenuFont()
FontProps.FontName(FontName)
FontProps.FontSize(11)
! this alters POPUP() menus too
! see Libsrc\Win\MenuStyle.inc/clw