Xref: utzoo comp.windows.x:35935 comp.windows.open-look:1331 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!male!silverwood!helvie From: helvie@EBay.Sun.COM (Fred Helvie) Newsgroups: comp.windows.x,comp.windows.open-look Subject: Re: Open Look Scrolling List help!!! Message-ID: Date: 2 May 91 00:30:31 GMT References: Sender: news@male.EBay.Sun.COM Followup-To: comp.windows.x Lines: 80 kkirksey@eng.auburn.edu (Kenneth B. Kirksey) writes: >Is there an easy way (or any way at all) to specify fonts for the individual >elements in a Open Look Scrolling List widget? Can you set background colors >for the individual elements? I'm writing an application that I need to >have certain elements in a scrolling list highlighted in some way. Is this >possible? for fonts use the attribute: PANEL_LIST_FONTS, font1, font2, ..., 0, I'm not sure about "highlighting" an item, but you can "select" it: PANEL_LIST_SELECT, row, boolean, follows is some code. Fred Helvie Sun Education ------ cut here ----- #include #include #include main(argc,argv) int argc; char **argv; { Frame frame; Panel panel; Panel_item list_item; Xv_Font f1, f2, f3; int list_proc(); (void)xv_init(XV_INIT_ARGC_PTR_ARGV, &argc, argv, 0); frame = xv_create(XV_NULL, FRAME_BASE, XV_LABEL, "List Fonts", 0); panel = xv_create(frame, PANEL, 0); 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); xv_set(list_item, PANEL_LIST_SELECT, 0, 1, PANEL_LIST_SELECT, 2, 1, 0); window_fit(panel); window_fit(frame); xv_main_loop(frame); }