Page 2 of 2
Re: Combination drop and popup list
Posted: Sun Mar 04, 2018 6:02 pm
by Spogg
tulamide wrote:What you are looking for is a menu The dropbox is not a menu, it is a list. Lists behave differently. Menus (like a right click popup menu) are not part of the Windows controls that Flowstone provides.
There might be a way to call them using the Windows API, but I'm not very fit in that area.
Oh I see! I obviously got the nomenclature wrong. I thought that a list was potentially a menu and vice versa, depending on usage.
Clearly there's a not-so-subtle difference. That explains why Ruby doesn't provide what I'm looking for, since it doesn't have
menu controls, just lists.
Lesson for today for me, many thanks
Spogg
Re: Combination drop and popup list
Posted: Tue Apr 03, 2018 9:40 am
by Spogg
I checked this out in Visual Basic 6 and if you create a basic “Combobox” with a “Dropdown list” style you get the behaviour I wanted.
In Windows you have to call into the ComCtl32 library but I had no luck trying this with FS using Win32API. Whatever I did I got a Load error back from the ComCtl32.dll, so obviously I wasn’t doing it right, in spite of reading the Windows API spec till my eyes bled.
You don’t need to create an extended window for such a simple requirement but the process and parameters passed and returned seem opaque to me at the moment.
Cheers
Spogg
Re: Combination drop and popup list
Posted: Wed Apr 04, 2018 9:39 am
by Spogg
Just out of pure interest I think I found that it’s a mouse handling issue that’s preventing the drag-to-select behaviour I was looking for.
With a left-down and hold, the prim and Ruby droplist selectors pass the mouse control to Windows but in this case the mouse is already down.
My modified Ruby version (attached) responds to a right-click and drag, so the left button isn’t down when making the call. Then you can operate the control in both ways; right click-drag down-release to select, OR right click-release then click again to select. It works.
Not much use really since users expect to left-click to select. But I think it explains why it is as it is.
Cheers
Spogg
Re: Combination drop and popup list
Posted: Thu Apr 05, 2018 9:15 am
by adamszabo
interesting find!