1. [Win32Lib] ComboBox drop-down doesn't move with window
- Posted by Dan Moyer <DANIELMOYER at prodigy.net> Jan 28, 2003
- 457 views
Below is a demo of a problem I've encountered with combo-boxes: if I make the list drop-down, & then move the window, the drop-down list remains where it was instead of moving with the window, though it is still functional. Both combos in the demo exhibit the problem, the first is "auto" drop-downed, the second has the same problem if the user clicks on the drop-down arrow & then moves the window. Is this a bug? What's the best way to fix this? Dan Moyer --<code begins> -- code generated by Win32Lib IDE v0.14.2 include Win32Lib.ew without warning ---------------------------------------------------------------------------- ---- -- Window Window1 constant Window1 = createEx( Window, "Window1", 0, Default, Default, 400, 300, 0, 0 ) constant Combo2 = createEx( Combo, "Combo2", Window1, 44, 64, 148, 420*6, 0, 0 ) constant Combo4 = createEx( Combo, "Combo4", Window1, 208, 64, 148, 20*6, 0, 0 ) --------------------------------------------------------- ---------------------------------------------------------------------------- ---- object dummy ---------------------------------------------------------------------------- ---- procedure Window1_onActivate (integer self, integer event, sequence params) for n = 1 to 5 do addItem( Combo2, "Item" & sprint(n) ) end for dummy = sendMessage(Combo2, CB_SHOWDROPDOWN, False,0) dummy = sendMessage(Combo2, CB_SHOWDROPDOWN, True,0) setIndex( Combo2, 1 ) for n = 1 to 5 do addItem( Combo4, "Item" & sprint(n) ) end for setIndex( Combo4, 1 ) end procedure setHandler( Window1, w32HActivate, routine_id("Window1_onActivate")) WinMain( Window1,Normal )
2. Re: [Win32Lib] ComboBox drop-down doesn't move with window
- Posted by cafromsw at yahoo.com Jan 28, 2003
- 423 views
I don't know if this helps at all, I just tried 4 or 5 other 'Windows' programs and everyone of them closed the dropdown when I clicked to another part of the window. I guess that way it could never be open during a window move. btw one of my programs with DropDownLists behaves like your demo. Chris --- Dan Moyer <DANIELMOYER at prodigy.net> wrote: > > Below is a demo of a problem I've encountered with > combo-boxes: > > if I make the list drop-down, & then move the > window, the drop-down list > remains where it was instead of moving with the > window, though it is still > functional. Both combos in the demo exhibit the > problem, the first is > "auto" drop-downed, the second has the same problem > if the user clicks on > the drop-down arrow & then moves the window. > > Is this a bug? What's the best way to fix this? > > Dan Moyer > > --<code begins> > -- code generated by Win32Lib IDE v0.14.2 > > include Win32Lib.ew > without warning > > > 300, 0, 0 ) > constant Combo2 = createEx( Combo, "Combo2", > Window1, 44, 64, 148, 420*6, 0, > 0 ) > constant Combo4 = createEx( Combo, "Combo4", > Window1, 208, 64, 148, 20*6, 0, > 0 ) > > > > addItem( Combo2, "Item" & sprint(n) ) > end for > > dummy = sendMessage(Combo2, CB_SHOWDROPDOWN, > False,0) > dummy = sendMessage(Combo2, CB_SHOWDROPDOWN, > True,0) > setIndex( Combo2, 1 ) > > for n = 1 to 5 do > addItem( Combo4, "Item" & sprint(n) ) > > end for > setIndex( Combo4, 1 ) > > end procedure > setHandler( Window1, w32HActivate, > routine_id("Window1_onActivate")) > > > WinMain( Window1,Normal ) > > > > > TOPICA - Start your own email discussion group. > FREE! > > >
3. Re: [Win32Lib] ComboBox drop-down doesn't move with window
- Posted by Derek Parnell <ddparnell at bigpond.com> Jan 28, 2003
- 431 views
On Tue, 28 Jan 2003 14:07:24 -0800, Dan Moyer <DANIELMOYER at prodigy.net> wrote: > > Below is a demo of a problem I've encountered with combo-boxes: > > if I make the list drop-down, & then move the window, the drop-down list > remains where it was instead of moving with the window, though it is > still > functional. Both combos in the demo exhibit the problem, the first is > "auto" drop-downed, the second has the same problem if the user clicks on > the drop-down arrow & then moves the window. > > Is this a bug? What's the best way to fix this? Bug?!?! No this is a feature Actually, what win32lib should be doing is when a combo loses focus, a message should be sent to it to close-up the dropdown list. I'll add this to the list of items to improve win32lib. -- cheers, Derek Parnell
4. Re: [Win32Lib] ComboBox drop-down doesn't move with window
- Posted by Dan Moyer <DANIELMOYER at prodigy.net> Jan 29, 2003
- 414 views
Feature indeed! :) In the meantime, should I just use an "onLostFocus" event for the combo to close the list? Didn't you just come back from vacation? Dan ----- Original Message ----- From: "Derek Parnell" <ddparnell at bigpond.com> To: "EUforum" <EUforum at topica.com> Subject: Re: [Win32Lib] ComboBox drop-down doesn't move with window > > On Tue, 28 Jan 2003 14:07:24 -0800, Dan Moyer <DANIELMOYER at prodigy.net> > wrote: > > > > > Below is a demo of a problem I've encountered with combo-boxes: > > > > if I make the list drop-down, & then move the window, the drop-down list > > remains where it was instead of moving with the window, though it is > > still > > functional. Both combos in the demo exhibit the problem, the first is > > "auto" drop-downed, the second has the same problem if the user clicks on > > the drop-down arrow & then moves the window. > > > > Is this a bug? What's the best way to fix this? > > Bug?!?! No this is a feature > > Actually, what win32lib should be doing is when a combo loses focus, a > message should be sent to it to close-up the dropdown list. I'll add this > to the list of items to improve win32lib. > > -- > > cheers, > Derek Parnell > > > > TOPICA - Start your own email discussion group. FREE! >
5. Re: [Win32Lib] ComboBox drop-down doesn't move with window
- Posted by Dan Moyer <DANIELMOYER at prodigy.net> Jan 29, 2003
- 436 views
Ok, "onLostFocus" doesn't work as a trap when moving a window, but onPaint the window, with CB_SHOWDROPDOWN, False,0, will close the drop-down; however, what if I have more than one combo, & would like them to just remain as they happen to be, up if up, down if down, when moving the window? In other words, how can I find out whether a combo has its list dropped down or not? Dan Moyer ----- Original Message ----- From: "Dan Moyer" <DANIELMOYER at prodigy.net> To: "EUforum" <EUforum at topica.com> Subject: Re: [Win32Lib] ComboBox drop-down doesn't move with window > > Feature indeed! :) > > In the meantime, should I just use an "onLostFocus" event for the combo to > close the list? > > Didn't you just come back from vacation? > > Dan > > ----- Original Message ----- > From: "Derek Parnell" <ddparnell at bigpond.com> > To: "EUforum" <EUforum at topica.com> > Sent: Tuesday, January 28, 2003 3:14 PM > Subject: Re: [Win32Lib] ComboBox drop-down doesn't move with window > > > > On Tue, 28 Jan 2003 14:07:24 -0800, Dan Moyer <DANIELMOYER at prodigy.net> > > wrote: > > > > > > > > Below is a demo of a problem I've encountered with combo-boxes: > > > > > > if I make the list drop-down, & then move the window, the drop-down list > > > remains where it was instead of moving with the window, though it is > > > still > > > functional. Both combos in the demo exhibit the problem, the first is > > > "auto" drop-downed, the second has the same problem if the user clicks > on > > > the drop-down arrow & then moves the window. > > > > > > Is this a bug? What's the best way to fix this? > > > > Bug?!?! No this is a feature > > > > Actually, what win32lib should be doing is when a combo loses focus, a > > message should be sent to it to close-up the dropdown list. I'll add this > > to the list of items to improve win32lib. > > > > -- > > > > cheers, > > Derek Parnell > > > > > > TOPICA - Start your own email discussion group. FREE! > > > > > > TOPICA - Start your own email discussion group. FREE! >
6. Re: [Win32Lib] ComboBox drop-down doesn't move with window
- Posted by Dan Moyer <DANIELMOYER at prodigy.net> Jan 29, 2003
- 423 views
o, o, I figured it out myself! (with a little help from somewhere in the bowels of MicroSoft: CB_GETDROPPEDSTATE ) Dan Moyer --<begin code> -- code generated by Win32Lib IDE v0.14.2 include Win32lib.ew without warning ---------------------------------------------------------------------------- ---- -- Window Window1 constant Window1 = createEx( Window, "Window1", 0, Default, Default, 400, 300, 0, 0 ) constant Combo2 = createEx( Combo, "Combo2", Window1, 44, 64, 148, 420*6, 0, 0 ) constant Combo4 = createEx( Combo, "Combo4", Window1, 208, 64, 148, 20*6, 0, 0 ) --------------------------------------------------------- ---------------------------------------------------------------------------- ---- object dummy ---------------------------------------------------------------------------- ---- procedure Window1_onPaint (integer self, integer event, sequence params)--params is ( int x1, int y1, int x2, int y2 ) int result result = sendMessage ( Combo2, CB_GETDROPPEDSTATE , 0, 0 ) if result = 1 then dummy = sendMessage(Combo2, CB_SHOWDROPDOWN, False,0) dummy = sendMessage(Combo2, CB_SHOWDROPDOWN, True,0) end if result = sendMessage ( Combo4, CB_GETDROPPEDSTATE , 0, 0 ) if result = 1 then dummy = sendMessage(Combo4, CB_SHOWDROPDOWN, False,0) dummy = sendMessage(Combo4, CB_SHOWDROPDOWN, True,0) end if end procedure setHandler( Window1, w32HPaint, routine_id("Window1_onPaint")) ---------------------------------------------------------------------------- ---- procedure Window1_onActivate (integer self, integer event, sequence params)--params is () for n = 1 to 5 do addItem( Combo2, "Item" & sprint(n) ) end for dummy = sendMessage(Combo2, CB_SHOWDROPDOWN, False,0) dummy = sendMessage(Combo2, CB_SHOWDROPDOWN, True,0) setIndex( Combo2, 1 ) for n = 1 to 5 do addItem( Combo4, "Item" & sprint(n) ) end for setIndex( Combo4, 1 ) end procedure setHandler( Window1, w32HActivate, routine_id("Window1_onActivate")) WinMain( Window1,Normal ) --<end code> ----- Original Message ----- From: "Dan Moyer" <DANIELMOYER at prodigy.net> To: "EUforum" <EUforum at topica.com> Sent: Tuesday, January 28, 2003 7:05 PM Subject: Re: [Win32Lib] ComboBox drop-down doesn't move with window > > Ok, "onLostFocus" doesn't work as a trap when moving a window, but onPaint > the window, with CB_SHOWDROPDOWN, False,0, will close the drop-down; > however, what if I have more than one combo, & would like them to just > remain as they happen to be, up if up, down if down, when moving the window? > In other words, how can I find out whether a combo has its list dropped down > or not? > > Dan Moyer > > ----- Original Message ----- > From: "Dan Moyer" <DANIELMOYER at prodigy.net> > To: "EUforum" <EUforum at topica.com> > Sent: Tuesday, January 28, 2003 4:08 PM > Subject: Re: [Win32Lib] ComboBox drop-down doesn't move with window > > > > Feature indeed! :) > > > > In the meantime, should I just use an "onLostFocus" event for the combo to > > close the list? > > > > Didn't you just come back from vacation? > > > > Dan > > > > ----- Original Message ----- > > From: "Derek Parnell" <ddparnell at bigpond.com> > > To: "EUforum" <EUforum at topica.com> > > Sent: Tuesday, January 28, 2003 3:14 PM > > Subject: Re: [Win32Lib] ComboBox drop-down doesn't move with window > > > > > > > On Tue, 28 Jan 2003 14:07:24 -0800, Dan Moyer <DANIELMOYER at prodigy.net> > > > wrote: > > > > > > > > > > > Below is a demo of a problem I've encountered with combo-boxes: > > > > > > > > if I make the list drop-down, & then move the window, the drop-down > list > > > > remains where it was instead of moving with the window, though it is > > > > still > > > > functional. Both combos in the demo exhibit the problem, the first is > > > > "auto" drop-downed, the second has the same problem if the user clicks > > on > > > > the drop-down arrow & then moves the window. > > > > > > > > Is this a bug? What's the best way to fix this? > > > > > > Bug?!?! No this is a feature > > > > > > Actually, what win32lib should be doing is when a combo loses focus, a > > > message should be sent to it to close-up the dropdown list. I'll add > this > > > to the list of items to improve win32lib. > > > > > > -- > > > > > > cheers, > > > Derek Parnell > > >
7. Re: [Win32Lib] ComboBox drop-down doesn't move with window
- Posted by Dan Moyer <DANIELMOYER at prodigy.net> Jan 29, 2003
- 454 views
But now I see another problem: if a drop-down list has been scrolled downward, & the window it's in is moved, it would be nice to have the list be shown after the move just as it was before; so I tried to use "CB_GETTOPINDEX", which is supposed to get the index of the topmost *showing* item on the list. But when I do so, I always get a return of "0", instead of the zero based index of the topmost showing item. Anyone have any idea what I'm doing wrong? Dan Moyer Here's the code I used in the onPaint event trap: result = sendMessage ( Combo2, CB_GETDROPPEDSTATE , 0, 0 ) if result = 1 then result= sendMessage ( Combo2, CB_GETTOPINDEX , 0, 0 ) puts(1, sprint(result)) if result > 0 then dummy = sendMessage(Combo2, CB_SETTOPINDEX, result,0) end if dummy = sendMessage(Combo2, CB_SHOWDROPDOWN, False,0) dummy = sendMessage(Combo2, CB_SHOWDROPDOWN, True,0) end if ----- Original Message ----- From: "Dan Moyer" <DANIELMOYER at prodigy.net> To: "EUforum" <EUforum at topica.com> Sent: Wednesday, January 29, 2003 5:12 AM Subject: Re: [Win32Lib] ComboBox drop-down doesn't move with window > > o, o, I figured it out myself! (with a little help from somewhere in the > bowels of MicroSoft: CB_GETDROPPEDSTATE ) > > Dan Moyer > > --<begin code> > -- code generated by Win32Lib IDE v0.14.2 > > include Win32lib.ew > without warning > > -------------------------------------------------------------------------- -- > ---- > -- Window Window1 > constant Window1 = createEx( Window, "Window1", 0, Default, Default, 400, > 300, 0, 0 ) > constant Combo2 = createEx( Combo, "Combo2", Window1, 44, 64, 148, 420*6, 0, > 0 ) > constant Combo4 = createEx( Combo, "Combo4", Window1, 208, 64, 148, 20*6, 0, > 0 ) > --------------------------------------------------------- > -------------------------------------------------------------------------- -- > ---- > object dummy > > -------------------------------------------------------------------------- -- > ---- > procedure Window1_onPaint (integer self, integer event, sequence > params)--params is ( int x1, int y1, int x2, int y2 ) > int result > > result = sendMessage ( Combo2, CB_GETDROPPEDSTATE , 0, 0 ) > if result = 1 then > dummy = sendMessage(Combo2, CB_SHOWDROPDOWN, False,0) > dummy = sendMessage(Combo2, CB_SHOWDROPDOWN, True,0) > > > end if > > result = sendMessage ( Combo4, CB_GETDROPPEDSTATE , 0, 0 ) > if result = 1 then > dummy = sendMessage(Combo4, CB_SHOWDROPDOWN, False,0) > dummy = sendMessage(Combo4, CB_SHOWDROPDOWN, True,0) > > > end if > end procedure > setHandler( Window1, w32HPaint, routine_id("Window1_onPaint")) > -------------------------------------------------------------------------- -- > ---- > procedure Window1_onActivate (integer self, integer event, sequence > params)--params is () > for n = 1 to 5 do > addItem( Combo2, "Item" & sprint(n) ) > end for > > dummy = sendMessage(Combo2, CB_SHOWDROPDOWN, False,0) > dummy = sendMessage(Combo2, CB_SHOWDROPDOWN, True,0) > setIndex( Combo2, 1 ) > > for n = 1 to 5 do > addItem( Combo4, "Item" & sprint(n) ) > > end for > setIndex( Combo4, 1 ) > > end procedure > setHandler( Window1, w32HActivate, routine_id("Window1_onActivate")) > > > WinMain( Window1,Normal ) > > --<end code> > > ----- Original Message ----- > From: "Dan Moyer" <DANIELMOYER at prodigy.net> > To: "EUforum" <EUforum at topica.com> > Sent: Tuesday, January 28, 2003 7:05 PM > Subject: Re: [Win32Lib] ComboBox drop-down doesn't move with window > > > > Ok, "onLostFocus" doesn't work as a trap when moving a window, but onPaint > > the window, with CB_SHOWDROPDOWN, False,0, will close the drop-down; > > however, what if I have more than one combo, & would like them to just > > remain as they happen to be, up if up, down if down, when moving the > window? > > In other words, how can I find out whether a combo has its list dropped > down > > or not? > > > > Dan Moyer > > > > ----- Original Message ----- > > From: "Dan Moyer" <DANIELMOYER at prodigy.net> > > To: "EUforum" <EUforum at topica.com> > > Sent: Tuesday, January 28, 2003 4:08 PM > > Subject: Re: [Win32Lib] ComboBox drop-down doesn't move with window > > > > > > > Feature indeed! :) > > > > > > In the meantime, should I just use an "onLostFocus" event for the combo > to > > > close the list? > > > > > > Didn't you just come back from vacation? > > > > > > Dan > > > > > > ----- Original Message ----- > > > From: "Derek Parnell" <ddparnell at bigpond.com> > > > To: "EUforum" <EUforum at topica.com> > > > Sent: Tuesday, January 28, 2003 3:14 PM > > > Subject: Re: [Win32Lib] ComboBox drop-down doesn't move with window > > > > > > > > > > On Tue, 28 Jan 2003 14:07:24 -0800, Dan Moyer > <DANIELMOYER at prodigy.net> > > > > wrote: > > > > > > > > > > > > > > Below is a demo of a problem I've encountered with combo-boxes: > > > > > > > > > > if I make the list drop-down, & then move the window, the drop-down > > list > > > > > remains where it was instead of moving with the window, though it is > > > > > still > > > > > functional. Both combos in the demo exhibit the problem, the first > is > > > > > "auto" drop-downed, the second has the same problem if the user > clicks > > > on > > > > > the drop-down arrow & then moves the window. > > > > > > > > > > Is this a bug? What's the best way to fix this? > > > > > > > > Bug?!?! No this is a feature > > > > > > > > Actually, what win32lib should be doing is when a combo loses focus, a > > > > message should be sent to it to close-up the dropdown list. I'll add > > this > > > > to the list of items to improve win32lib. > > > > > > > > -- > > > > > > > > cheers, > > > > Derek Parnell > > > > > > > > TOPICA - Start your own email discussion group. FREE! >
8. Re: [Win32Lib] ComboBox drop-down doesn't move with window
- Posted by ShelbySue at granbury.com Jan 29, 2003
- 433 views
Dan, I am glad I was able to help you work through this! I will continue to assist with the Top Index issue in the same zealous manner. Joe Phillips
9. Re: [Win32Lib] ComboBox drop-down doesn't move with window
- Posted by Dan Moyer <DANIELMOYER at prodigy.net> Jan 30, 2003
- 424 views
Eh? <puzzled emoticon here> Dan Moyer ----- Original Message ----- From: <ShelbySue at granbury.com> To: "EUforum" <EUforum at topica.com> Subject: Re: [Win32Lib] ComboBox drop-down doesn't move with window > > Dan, I am glad I was able to help you work through this! > > I will continue to assist with the Top Index issue in the same zealous > manner. > > Joe Phillips > >
10. Re: [Win32Lib] ComboBox drop-down doesn't move with window
- Posted by Judith Evans <camping at txcyber.com> Jan 30, 2003
- 443 views
Hi Dan, See if this does what you want. I also changed w32HPaint to w32HEvent so the colapse and reshow of the combos would not happen when resizing the main window. -- code generated by Win32Lib IDE v0.14.2 include Win32lib.ew without warning ---------------------------------------------------------------------------- ---- -- Window Window1 constant Window1 = createEx( Window, "Window1", 0, Default, Default, 400, 300, 0, 0 ) constant Combo2 = createEx( Combo, "Combo2", Window1, 44, 64, 148, 420*6, 0, 0 ) constant Combo4 = createEx( Combo, "Combo4", Window1, 208, 64, 148, 20*6, 0, 0 ) --------------------------------------------------------- ---------------------------------------------------------------------------- ---- object dummy ---------------------------------------------------------------------------- ---- procedure Window1_onEvent (integer self, integer event, sequence --procedure Window1_onPaint (integer self, integer event, sequence params)--params is ( int x1, int y1, int x2, int y2 ) int result,index,index2 if params[1]=WM_MOVE then --find active index index=getIndex(Combo2) index2=getIndex(Combo4) result = sendMessage ( Combo2, CB_GETDROPPEDSTATE , 0, 0 ) if result = 1 then dummy = sendMessage(Combo2, CB_SHOWDROPDOWN, False,0) dummy = sendMessage(Combo2, CB_SHOWDROPDOWN, True,0) end if index2=getIndex(Combo4) result = sendMessage ( Combo4, CB_GETDROPPEDSTATE , 0, 0 ) if result = 1 then dummy = sendMessage(Combo4, CB_SHOWDROPDOWN, False,0) dummy = sendMessage(Combo4, CB_SHOWDROPDOWN, True,0) end if setIndex(Combo2,index) setIndex(Combo4,index2) end if end procedure --setHandler( Window1, w32HPaint, routine_id("Window1_onPaint")) setHandler( Window1, w32HEvent, routine_id("Window1_onEvent")) ---------------------------------------------------------------------------- ---- procedure Window1_onActivate (integer self, integer event, sequence params)--params is () for n = 1 to 15 do addItem( Combo2, "Item" & sprint(n) ) end for dummy = sendMessage(Combo2, CB_SHOWDROPDOWN, False,0) dummy = sendMessage(Combo2, CB_SHOWDROPDOWN, True,0) setIndex( Combo2, 1 ) for n = 1 to 15 do addItem( Combo4, "Item" & sprint(n) ) end for setIndex( Combo4, 1 ) end procedure setHandler( Window1, w32HActivate, routine_id("Window1_onActivate")) WinMain( Window1,Normal ) >>But now I see another problem: >>if a drop-down list has been scrolled downward, & the window it's in is >>moved, it would be nice to have the list be shown after the move just as it >>was before; so I tried to use "CB_GETTOPINDEX", which is supposed to get the >>index of the topmost *showing* item on the list. But when I do so, I always >get a return of "0", instead of the zero based index of the topmost showing >>item. Anyone have any idea what I'm doing wrong? >>Dan Moyer
11. Re: [Win32Lib] ComboBox drop-down doesn't move with window
- Posted by Dan Moyer <DANIELMOYER at prodigy.net> Jan 31, 2003
- 455 views
Judith, Well, not exactly: your clever & simple method works only if the user *selects* an item in the scrolled down list (& then re-opens the list), in which case the selected item will be the topmost item on move the window, even if it wasn't the topmost previously; but if you scroll the 2nd combo list down, but do *not* select anything new in it, I think that on moving the window I should be able to get the new *scrolled* position to re-show. So what I don't get is why the "CB_GETTOPINDEX" doesn't work, because it's supposed to get the index of the topmost *showing* item on the list. Oh, and taking a hint from you, I did also move the test into w32HEvent, using your code in IDE as an example :) Dan ----- Original Message ----- From: "Judith Evans" <camping at txcyber.com> To: "EUforum" <EUforum at topica.com> Sent: Thursday, January 30, 2003 6:33 AM Subject: Re: [Win32Lib] ComboBox drop-down doesn't move with window > > Hi Dan, > > See if this does what you want. I also changed w32HPaint to w32HEvent so the > colapse and reshow of the combos would not happen when resizing the main > window. > > -- code generated by Win32Lib IDE v0.14.2 > > include Win32lib.ew > without warning > > -------------------------------------------------------------------------- -- > ---- > -- Window Window1 > constant Window1 = createEx( Window, "Window1", 0, Default, Default, 400, > 300, 0, 0 ) > constant Combo2 = createEx( Combo, "Combo2", Window1, 44, 64, 148, 420*6, 0, > 0 ) > constant Combo4 = createEx( Combo, "Combo4", Window1, 208, 64, 148, 20*6, 0, > 0 ) > --------------------------------------------------------- > -------------------------------------------------------------------------- -- > ---- > object dummy > > -------------------------------------------------------------------------- -- > ---- > procedure Window1_onEvent (integer self, integer event, sequence > --procedure Window1_onPaint (integer self, integer event, sequence > params)--params is ( int x1, int y1, int x2, int y2 ) > int result,index,index2 > if params[1]=WM_MOVE then > --find active index > index=getIndex(Combo2) > index2=getIndex(Combo4) > result = sendMessage ( Combo2, CB_GETDROPPEDSTATE , 0, 0 ) > if result = 1 then > dummy = sendMessage(Combo2, CB_SHOWDROPDOWN, False,0) > dummy = sendMessage(Combo2, CB_SHOWDROPDOWN, True,0) > > > end if > index2=getIndex(Combo4) > result = sendMessage ( Combo4, CB_GETDROPPEDSTATE , 0, 0 ) > if result = 1 then > dummy = sendMessage(Combo4, CB_SHOWDROPDOWN, False,0) > dummy = sendMessage(Combo4, CB_SHOWDROPDOWN, True,0) > > > end if > setIndex(Combo2,index) > setIndex(Combo4,index2) > > end if > end procedure > --setHandler( Window1, w32HPaint, routine_id("Window1_onPaint")) > setHandler( Window1, w32HEvent, routine_id("Window1_onEvent")) > -------------------------------------------------------------------------- -- > ---- > procedure Window1_onActivate (integer self, integer event, sequence > params)--params is () > for n = 1 to 15 do > addItem( Combo2, "Item" & sprint(n) ) > end for > > dummy = sendMessage(Combo2, CB_SHOWDROPDOWN, False,0) > dummy = sendMessage(Combo2, CB_SHOWDROPDOWN, True,0) > setIndex( Combo2, 1 ) > > for n = 1 to 15 do > addItem( Combo4, "Item" & sprint(n) ) > > end for > setIndex( Combo4, 1 ) > > end procedure > setHandler( Window1, w32HActivate, routine_id("Window1_onActivate")) > > > WinMain( Window1,Normal ) > > >>But now I see another problem: > >>if a drop-down list has been scrolled downward, & the window it's in is > >>moved, it would be nice to have the list be shown after the move just as > it > >>was before; so I tried to use "CB_GETTOPINDEX", which is supposed to get > the > >>index of the topmost *showing* item on the list. But when I do so, I > always > >get a return of "0", instead of the zero based index of the topmost showing > >>item. Anyone have any idea what I'm doing wrong? > > >>Dan Moyer > > > > TOPICA - Start your own email discussion group. FREE! >