[comp.windows.x] XView: Setting PANEL_MESSAGE font?

warsaw@nlm.nih.gov (Barry A. Warsaw) (04/04/91)

I didn't get any answers when I posted this to comp.windows.open-look
so I'm reposting to c.w.x.... -Barry


Hello!  I've been trying to set the font of an XView PANEL_MESSAGE
item with absolutely no success. I'm presuming it can be done since
I am able to set a PANEL_LIST row's font with PANEL_LIST_FONT(S) and
row entries are PANEL_MESSAGE items right?  I've kinda perused the
XView source (p_list.c) and I think I see how they do it, but when I
try it -- nothing.

I've tried setting the font with PANEL_LABEL_FONT (which p_list.c
uses, but is undocumented), and with XV_FONT when both creating the
message item with xv_create and later with xv_set.  No luck with
either!

Anyway, I'm sure this is not Open-Looky, but hey "sometimes you gotta
just break the rules" :-).  Any help (or even better, a working
example!) will be greatly appreciated.  Thanks.

-Barry

NAME:  Barry A. Warsaw         INET: warsaw@nlm.nih.gov
TELE:  (301) 496-1936          UUCP: uunet!nlm.nih.gov!warsaw

fgreco@govt.shearson.COM (Frank Greco) (04/04/91)

> Hello!  I've been trying to set the font of an XView PANEL_MESSAGE
> item with absolutely no success. I'm presuming it can be done since
> I am able to set a PANEL_LIST row's font with PANEL_LIST_FONT(S) and
> row entries are PANEL_MESSAGE items right?  I've kinda perused the
> XView source (p_list.c) and I think I see how they do it, but when I
> try it -- nothing.

	According to the OPENLOOK spec, all fonts in a panel should be
	the same font (I don't agree, but that's another story).  So
	since PANEL_MESSAGE's are Panel Items, you change the font
	by setting the font on the *panel*, not on the panel message.
	Unfortunately, everything else in that panel also changes.
	So if you want separate fonts for different panel items,
	you are forced to use separate panels.

	Frank G.