home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / windows / openloo / 4882 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.6 KB  |  63 lines

  1. Newsgroups: comp.windows.open-look
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!uvaarpa!concert!unccsun.uncc.edu!ws26!akpatel
  3. From: akpatel@uncc.edu (Alpesh K Patel)
  4. Subject:  Calling another text window    
  5. Message-ID: <BzJFMq.AIL@unccsun.uncc.edu>
  6. Sender: usenet@unccsun.uncc.edu
  7. Nntp-Posting-Host: ws26.uncc.edu
  8. Reply-To: akpatel@uncc.edu
  9. Organization: University of NC at Charlotte
  10. Date: Sun, 20 Dec 1992 03:13:37 GMT
  11. Lines: 50
  12.  
  13.     I am trying to call a text window (read-only) when the user presses something.
  14.  
  15.     Example ( Help ) <--- User presses this Panel_button
  16.     and a text window will come up .
  17.     But for some reason When the use presses the button it just comes back with nothing.
  18.  
  19.     My codes follows.
  20.  
  21.  
  22.  
  23.  
  24.      xv_create(panel, PANEL_BUTTON,
  25.         PANEL_LABEL_STRING,     "HELP",
  26.         PANEL_ITEM_COLOR,       CMS_CONTROL_COLORS + BLUE,
  27.         PANEL_NOTIFY_PROC,      pressed,
  28.         NULL);
  29.  
  30.     .
  31.     ,
  32.     .
  33. void
  34. pressed(item, event)
  35. Panel_item item;
  36. Event *event;
  37. {
  38.     Frame       frame;
  39.     Textsw          textsw;
  40.     Canvas          canvas;
  41.     Scrollbar       sbar;
  42.     Notify_value    monitor_scroll();
  43.  
  44.     char *name = (char *)xv_get(item, PANEL_LABEL_STRING);
  45.  
  46.         frame = xv_create(NULL,FRAME,NULL);
  47.         textsw=xv_create(frame,TEXTSW,
  48.                 TEXTSW_FILE_CONTENTS, "/tmp/test/help_doc",
  49.                 TEXTSW_READ_ONLY, TRUE,
  50.                 NULL);
  51.                 sbar=xv_get(textsw,TEXTSW_SCROLLBAR);
  52.         notify_interpose_event_func(xv_get(sbar, SCROLLBAR_NOTIFY_CLIENT),
  53.         monitor_scroll, NOTIFY_SAFE);
  54. }
  55.  
  56.  
  57.     I think, it is probabily something wierd that I am doing.
  58.  
  59.     Thank you,
  60.     Alpesh Patel
  61.     E-mail : akpatel@mosaic.uncc.edu
  62.  
  63.