Combination drop and popup list

For general discussion related FlowStone
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: Combination drop and popup list

Post 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 :D

Spogg
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: Combination drop and popup list

Post 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
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: Combination drop and popup list

Post 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
Attachments
Right-click drag-select droplist.fsm
(3.93 KiB) Downloaded 971 times
adamszabo
Posts: 667
Joined: Sun Jul 11, 2010 7:21 am

Re: Combination drop and popup list

Post by adamszabo »

interesting find!
Post Reply