home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.open-look
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!uvaarpa!concert!unccsun.uncc.edu!ws26!akpatel
- From: akpatel@uncc.edu (Alpesh K Patel)
- Subject: Calling another text window
- Message-ID: <BzJFMq.AIL@unccsun.uncc.edu>
- Sender: usenet@unccsun.uncc.edu
- Nntp-Posting-Host: ws26.uncc.edu
- Reply-To: akpatel@uncc.edu
- Organization: University of NC at Charlotte
- Date: Sun, 20 Dec 1992 03:13:37 GMT
- Lines: 50
-
- I am trying to call a text window (read-only) when the user presses something.
-
- Example ( Help ) <--- User presses this Panel_button
- and a text window will come up .
- But for some reason When the use presses the button it just comes back with nothing.
-
- My codes follows.
-
-
-
-
- xv_create(panel, PANEL_BUTTON,
- PANEL_LABEL_STRING, "HELP",
- PANEL_ITEM_COLOR, CMS_CONTROL_COLORS + BLUE,
- PANEL_NOTIFY_PROC, pressed,
- NULL);
-
- .
- ,
- .
- void
- pressed(item, event)
- Panel_item item;
- Event *event;
- {
- Frame frame;
- Textsw textsw;
- Canvas canvas;
- Scrollbar sbar;
- Notify_value monitor_scroll();
-
- char *name = (char *)xv_get(item, PANEL_LABEL_STRING);
-
- frame = xv_create(NULL,FRAME,NULL);
- textsw=xv_create(frame,TEXTSW,
- TEXTSW_FILE_CONTENTS, "/tmp/test/help_doc",
- TEXTSW_READ_ONLY, TRUE,
- NULL);
- sbar=xv_get(textsw,TEXTSW_SCROLLBAR);
- notify_interpose_event_func(xv_get(sbar, SCROLLBAR_NOTIFY_CLIENT),
- monitor_scroll, NOTIFY_SAFE);
- }
-
-
- I think, it is probabily something wierd that I am doing.
-
- Thank you,
- Alpesh Patel
- E-mail : akpatel@mosaic.uncc.edu
-
-