[comp.windows.open-look] Panel Lists

frose@ (Flavio Rose) (12/22/90)

Followup-To: 
Distribution: world
Organization: SynOptics Communications Inc. Santa Clara, Ca.
Disclaimer: Sender is *solely* responsible for the contents of message
Keywords: 

Some questions on XView that I can't seem to figure out from
the O'Reilly manual (next step is read the source code... or
is there some other manual?).

a) Is there a way to turn off the user's ability to edit a
panel list? I want to use the list to display read-only
information.

b) Is there a way to prevent the user from selecting anything
in a panel list? Same motivation as preceding.

c) Is there a way to have a "disembodied" scroll bar in a
panel, i.e. one without a panel list attached? The idea would
be to use this scroll bar to let the user scroll information
that is displayed via the PANEL_BACKGROUND_PROC.

I realize that putting the scrolled info in a canvas is an
alternative way to accomplish my goals. Unfortunately what
I want is something like

	+---------------------+
        |     panel items     |
        | +---------+  more   |
        | |scrolling|  panel  |
        | | list    |  items  |
        | +---------+         |
        |   more panel items  |
        +---------------------+

With this geometry, if I make the scrolling list be a
canvas rather than a panel list, then I have to distribute
the panel items among three separate panels, top, right and
bottom. (Or do I?)

Any help would be most appreciated.

Yours truly,
Flavio Rose
SynOptics Communications, Inc.

jipping@cs.hope.edu (Mike Jipping) (12/27/90)

In article <22135@mvis1.com>, frose@ (Flavio Rose) writes:
>
> a) Is there a way to turn off the user's ability to edit a
> panel list? I want to use the list to display read-only
> information.

Do an "xv_set(the_panel_list, PANEL_READ_ONLY, TRUE, 0);"

> b) Is there a way to prevent the user from selecting anything
> in a panel list? Same motivation as preceding.

The above should perform this, too.  Also make sure you set 
"xv_set(the_panel_list, PANEL_LIST_CHOOSE_NONE, TRUE, 0);"

> c) Is there a way to have a "disembodied" scroll bar in a
> panel, i.e. one without a panel list attached? The idea would
> be to use this scroll bar to let the user scroll information
> that is displayed via the PANEL_BACKGROUND_PROC.

Hmmm...you don't need anything special here.  You can specify how
to handle scrollbar events -- see section 10.4 of the Heller book.  
This way you could attach a scroolbar to the object it was meant to
control, yet use it any ol' way you like.

> With this geometry, if I make the scrolling list be a
> canvas rather than a panel list, then I have to distribute
> the panel items among three separate panels, top, right and
> bottom. (Or do I?)

No.  I've plopped canvases right in the middle of panels before.  As
long as you specify absolute positioning for panel items...things 
work fine.

      Mike Jipping
      Hope College Department of Computer Science
      jipping@cs.hope.edu  (BITNET: JIPPING@HOPE)

      "The 70's are over old man.  Take your mood ring and
       go home."
                                   -- Dana Gould