Re: IDL Menu Fonts [message #8068] |
Wed, 05 February 1997 00:00 |
Peter Mason
Messages: 145 Registered: June 1996
|
Senior Member |
|
|
On Tue, 4 Feb 1997, Brian J Soher wrote:
> Got a question about how to change the font for the elements in a
> CW_PDMENU. We are using IDL 4.0 in a Windows NT 4.0 PC. I
> create a base with a Mbar keyword followed by a bunch of other
> widget element declarations (text, buttons etc). I use a:
>
> WIDGET_CONTROL, tlbid, Default_font='arial*16'
>
> immediately after the base declaration to change the font in the
> base. All the widget elements in the base behave nicely,
> realized in arial*16 font, but the elements I load into the Mbar
> base ID stick with the NT defined menubar font (as set in the
> Control Panel - Display utility).
>
> I have also tried setting the FONT keyword for the CW_PDMENU
> call. No change. I have tried a: WIDGET_CONTROL, menu_base,
> Default_font='arial*16' command too. No change.
>
> I am starting to think that it is a problem with NT4.0 ? just
> because, nothing I do seems to affect the font used in the
> menubar.
>
> Any thoughts would be appreciated, thanks in advance.
I experience the same problem under NT 3.51 - I can't change the font of
widgets in a menubar. I suspect that it is due to a style restriction in
the Windows API (not IDL) - i.e., that Windows doesn't let you pick a
font for a menu "widget".
One can change menubar fonts freely under Unix.
By the way, I think that WIDGET_CONTROL,DEFAULT_FONT=... is one of those
"global" WIDGET CONTROL calls, even though the docs don't point this
out. (In fact the docs are misleading in that they state that
WIDGET_CONTROL requires a widget_id argument for all calls except /RESET.)
It ignores any widget-id argument you pass, and sets the font for all
widgets created subsequently. (If you explicitly specify a widget's
font via the /FONT keyword then this default is overridden, of course.)
It still would have worked in your case - that is, if Windows allowed it :)
Peter Mason
|
|
|