Glenn Linderman wrote:
I continued looking at this issue, and discovered some code in my "real"
program, that wasn't in the test program.
Apparently, way back in the dark ages of Win32::GUI, in order to get
things to work right, I had to "fiddle" with some of the style
settings... and some of that code made its way into a common subroutine,
and got included in this program too.
WS_VSCROLL | WS_VISIBLE | WS_CHILD | 1
The first two can be replaced in modern GUI by
-vscroll => 1, -visible => 1
Not sure that the third one is really necessary now, I think it was
necessary then because it was -setstyle (later converted to -addstyle).
-visible shouldn't be necessary. -vscroll is required if you want a
vertical scrollbar on the comboxbox's listview window.
Interesting history lesson. I think I am seeing the reason for
-setstyle being marked deprecated, although I think it still has its
uses if you know what you're doing.
Is there an option that is equivalent to WS_CHILD?
No. Win32::GUI tries to get it right itself. You shouldn't need this
today, unless you're trying to do something funky.
Not sure why the last one (1) was included, but clearly it is part of
the current confusion.
The (1) is CBS_SIMPLE. So if you had this there and used -dropdown
(CBS_DROPDOWN = 2) you'd actually get a dropdownlist (CBS_DROPDOWNLIST =
3 = CBS_SIMPLE | CBS_DROPDOWN). We're back to your original analysis.
I'll fix it so that if multiple of these 3 options are used, only the
last one will actually take effect, not a combination of them, and I'll
fix the docs to indicate that they are mutually exclusive.
Regards,
Rob.