Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Drop down menu/list

Author
Message
Millenium7
19
Years of Service
User Offline
Joined: 13th Dec 2004
Location:
Posted: 18th Oct 2005 10:36 Edited at: 18th Oct 2005 18:13
Edit: I've updated the function it now highlights your selection and returns the selected segment

Did a quick search and found only 1, just quickly skimmed through it and its quite lengthy doesn't need to be that long. Anyway heres another one its short and effective. Just call the function, seperate the text with a semi-colon ; it'll automatically create all segments. Don't place a semi-colon on the end though or you get an extra segment. EG "1;2;3;4;5;bla;bla;bla"

Note: The function doesn't count empty segments as a selection and won't highlight it either, this is useful in some situations such as placing a * next to your selection. But you can easily disable this



And a small example program, copy the above function into the program and click and hold a mouse button or spacebar to display the drop down list, if you release the button over exit it'll close the program
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 18th Oct 2005 21:34
man thats cool! I'm working on some GUI functions myself, I hope you don't mind if I use this as a foundation for me to use to build my own drop down menu?


RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 18th Oct 2005 22:40
Good job, looks excellent.


Millenium7
19
Years of Service
User Offline
Joined: 13th Dec 2004
Location:
Posted: 19th Oct 2005 09:09
Thanks, you can use this in whatever program you want, you can also modify it freely. If you want me to add something let me know but i'm a bit busy so I might not be able to add anything for a while but i'll try

Login to post a reply

Server time is: 2024-11-23 11:01:18
Your offset time is: 2024-11-23 11:01:18