Thanks for the information.  There is not much (if any) documentation on
properties in the GUI documentation. It is all about methods and events.

Eric

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Aldo "dada"
Calpini
Sent: Tuesday, December 07, 1999 10:38 AM
To: [EMAIL PROTECTED]
Subject: Re: [perl-win32-gui] Found BUG in Listbox Properties (-sort &
-style)


Eric C. Hansen wrote:
> Aldo, I found a bug in the properties for ListBoxes.  The -sort property
> must follow the -style property (if the style property is used) or else
> sorting won't work.  I am using AddString() now like you suggested instead
> of InsertItem().

I already explained this!!!

from a previous message of mine:
> keep in mind that when a control is created, it receives a set of
> "standard" styles (well, at least what *I* considered standard);
> but using the -style option, you're overriding them all!
> -style is good for power users, which already has familiarity
> with WINUSER.H and the likes.
> for the rest of the world, -style IS TO BE HANDLED WITH CARE!!!

I will try to explain this more clearly:

various options in control creations (eg. -sort in this case) are
just bits of style internally (in this case, LBS_SORT); so, if you
are not familiar with Windows Programming, I mean *C* Programming,
and you don't know how Windows controls work, and you don't have
WINUSER.H available (possibly memorized line by line), and you
are not able to read and understand the GUI.xs source code, please

    DON'T USE -style!
    DON'T USE -style!
    DON'T USE -style!

ok, now let's go back to your case: the real bug is the lack of
LBS_NOTIFY (the "1" in your -style option) on the Listbox, which
I'll turn on by default. to workaround the whole thing, add another
"2" (for LBS_SORT) to the -style:

    -style => WS_VISIBLE | WS_VSCROLL | 3 | WS_TABSTOP,

cheers,
Aldo

__END__
# Aldo Calpini
%_ = split undef, join ' ', qw(fahokem
xritajbugne csuctawer jhdtlrnpqloevkshpr
); print map $_{$_}, sort keys %_;







Reply via email to