From: Ken Cheetham

Subject: RE: aggregate widgets

Date: 1996-12-18 3:03


  1.  Has anyone figured out how to link a header control widget with a
  dialog pane so that when the user moves the header control back and
  forth, the boundary line moves back and forth in the dialog pane?

When the user drags a header boundary with the mouse, this calls the
header control's set-value-fn with the value T (rather than passing
the name of a header, as is done when the user clicks a header).  When
you see this T come in, you know that you need to re-align whatever
you intend to be aligned with the individual headers.  This might be
text that you are drawing directly on the dialog window, or other
widgets that need to be moved into alignment.  You can call
(header-width the-header-control header-name) for each of the headers
in the header control's range to find out their horizontal sizes, in
order to know where to align other stuff.  Or call header-box to get
the whole box of a particular header (relative to the header-control's
position).

There is a bug with this: Since the default value-equality-test for
all widgets is EQL, this means that when you drag a header border a
second time without clicking a header in the meantime, the widget's
value is set to T when it is already T and so the set-value-fn is not
called to inform you of the second drag.  A simple workaround is to
change the dialog-item-value-equality-test of the header-control to be
the symbol FALSE.  This function will always regard the new value as
"different" from the old one, and so the set-value-fn will always be
invoked when doing multiple header drags or multiple clicks on the
same header.

The next major release should have distinct default
value-equality-tests for particular widget classes, and it should be
FALSE for header-controls.

  2.  How can I get scroll bars where the "thumb" (the little box you
  manipulate with the mouse) is proportional instead of fixed length?

Text and item-list controls do this automatically in Win32, but in
order for this to work for generic windows and for scroll-bar controls
we need to modify Common Graphics to no longer use the older
SetScrollRange Windows API function and instead use the newer
SetScrollInfo function.  We haven't done this yet, but I've filed a
"request for enhancement" to upgrade this.

  3.  Is there a code repository somewhere for stuff like this?  I
  recently moved to ACL from MCL, and the MCL folks have a great code
  repository.

We are looking into setting up a code repository on our web site soon.

Ken Cheetham                          <franz.com at cheetham>
Franz Inc.                            Voice: (510) 548-3600
1995 University Avenue, Suite 275     Fax:   (510) 548-8253
Berkeley, CA  94704                   http:  //www.franz.com/
ACL Windows FAQ: ftp.franz.com:/pub/acl4w-faq
ACL Unix    FAQ: ftp.franz.com:/pub/faq