Path: utzoo!attcan!uunet!samsung!uakari.primate.wisc.edu!crdgw1!barnett From: barnett@grymoire.crd.ge.com (Bruce Barnett) Newsgroups: comp.windows.open-look Subject: custom Help window? Message-ID: Date: 12 Nov 90 21:48:07 GMT Sender: news@crdgw1.crd.ge.com Reply-To: barnett@crdgw1.ge.com Organization: GE Corp. R & D, Schenectady, NY Lines: 49 I want to create a custom Help Command Frame. I want to build a document (all text) at run time, and show it to the user when they press the Help key. The XView manual is very terse in this regards. I tried making a command subframe (page 67 of the XView manual, example 4-5) with a textsw inside it, but the text and scrollbar are positioned at the bottom of the subframe. Is this a bug? Does anyone have a better way? Example buggy code: #include #include #define HELPSTRING "This is sample help text!\n" main(argc,argv) int argc; char *argv[]; { Frame frame, subframe; Textsw sub_view; Textsw_index sub_index; xv_init(XV_INIT_ARGC_PTR_ARGV, &argc, argv, NULL); frame = (Frame)xv_create(NULL, FRAME, XV_WIDTH, 400, XV_HEIGHT, 400, FRAME_LABEL, "Base Frame", NULL); subframe = (Frame)xv_create(frame, FRAME_CMD, XV_WIDTH, 400, XV_HEIGHT, 800, FRAME_LABEL, "Popup", NULL); sub_view = (Textsw) xv_create(subframe, TEXTSW, NULL); sub_index = textsw_insert(sub_view,HELPSTRING, strlen(HELPSTRING)); window_fit(subframe); xv_set(subframe, XV_SHOW, TRUE, NULL); xv_main_loop(frame); } -- Bruce G. Barnett barnett@crd.ge.com uunet!crdgw1!barnett