[comp.windows.x] Need a text-handling panel item for XView

chris@flood.com (Chris Newton) (02/12/91)

Does anyone know of an existing panel item "package" for XView that will
provide me the following basic capabilities?

1) A scrollable subwindow in which arbitrary text can be displayed.
2) The text is passed as a pointer to a buffer - line wrap should be
   automatic.
3) The text can be "selected" for a copy operation, but otherwise
   user interaction is limited to scrolling.

The existing scrolling list package is inappropriate, because it fails
2) above and because there seems to be no way to totally disable the
selection logic.

I believe the text-subwindow package can be coerced to perform the
desired user interaction, but I'm not clear on how it could be worked
into a panel.  Has anyone done this?

Any ideas out there?

Thanks.

-Chris


-- 
Chris B. Newton			The Flood Group, Inc.	Lawndale, Ca.
Internet: chris@flood.com	(213) 219-1155
UUCP: ...!uunet!flood!chris

fgreco@govt.shearson.COM (Frank Greco) (02/13/91)

> 
> Does anyone know of an existing panel item "package" for XView that will
> provide me the following basic capabilities?
> 
> 1) A scrollable subwindow in which arbitrary text can be displayed.
> 2) The text is passed as a pointer to a buffer - line wrap should be
>    automatic.
> 3) The text can be "selected" for a copy operation, but otherwise
>    user interaction is limited to scrolling.

	Why must it be a panel item?  You could merely position the TEXTSW
	near the PANEL to visually connect the two.  Am I missing something?
> 
> The existing scrolling list package is inappropriate, because it fails
> 2) above and because there seems to be no way to totally disable the
> selection logic.

	Well yes, a scrolling list is inappropriate.  FYI, you can
	disable the selection logic by writing your own event proc.
	
> I believe the text-subwindow package can be coerced to perform the
> desired user interaction, but I'm not clear on how it could be worked
> into a panel.  Has anyone done this?

	I would use a *readonly* TEXTSW (i.e., set TEXTSW_BROWSING to TRUE)
	and load the thing with:

	xv_set(mytsw, TEXTSW_CONTENTS, "my arbitrary string", NULL);


	Any Help?

	Frank G.