csb@gdwb.oz.au (Craig Bishop) (05/15/91)
Is this possible? There is a PANEL_LIST_FONT setting for scolling lists but it isn't documented anywhere in the Xview book or in suns documentation. I have text which I want to line up correctly and I want to use a fixed font in thescrolling list. -- Craig Bishop Geelong & District Water Board Phone: +61 52 262506 61-67 Ryrie St Geelong Fax: +61 52 218236 Victoria 3220 Australia
helvie@EBay.Sun.COM (Fred Helvie) (05/17/91)
csb@gdwb.oz.au (Craig Bishop) writes: >Is this possible? >There is a PANEL_LIST_FONT setting for scolling lists but it >isn't documented anywhere in the Xview book or in suns >documentation. >I have text which I want to line up correctly and I want to use >a fixed font in thescrolling list. The default font for the list item is inherited from the panel, so if one font is desired, create the panel with a font: f1 = xv_find( frame, FONT, FONT_NAME, "screen-bold-18", 0 ); panel = xv_create(frame, PANEL, XV_FONT, f1, 0); list_item = xv_create(panel, PANEL_LIST, PANEL_CHOOSE_ONE, FALSE, PANEL_LIST_WIDTH, 100, PANEL_LABEL_STRING, "List Item", PANEL_LIST_DISPLAY_ROWS, 3, PANEL_LIST_STRINGS, "One", "Two", "Three", 0, 0); If you desire different fonts for each item in the list: f1 = xv_find( frame, FONT, FONT_NAME, "screen-bold-12", 0 ); f2 = xv_find( frame, FONT, FONT_NAME, "lucidasans-italic-10", 0 ); f3 = xv_find( frame, FONT, FONT_NAME, "courier-14", 0 ); list_item = xv_create(panel, PANEL_LIST, PANEL_CHOOSE_ONE, FALSE, PANEL_LIST_WIDTH, 100, PANEL_LABEL_STRING, "List Item", PANEL_LIST_DISPLAY_ROWS, 3, PANEL_LIST_STRINGS, "One", "Two", "Three", 0, PANEL_LIST_FONTS, f1, f2, f3, 0, 0); The attribute: PANEL_LIST_FONT, index, font, is for setting a font on a single list item. The xview header files are always the "definitive" reference - xview/panel.h :^) Fred Helvie Sun Education - Milpitas, CA - USA
** Sender Unknown ** (05/18/91)
> I have text which I want to line up correctly and I want to use > a fixed font in thescrolling list. options: 1. Bring up your app with a different (fixed) font: % app -font lucidasanstypewriter-bold-12 2. Use PANEL_LIST_FONT(S) when you put stuff into the list. 3. Change the font on the panel that owns the panel list to a fixed font. Frank G.