ComboBox - How to lock it ? - Solved
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
ComboBox - How to lock it ? - Solved
Hello,
How to make ComBox locked so user can't type in the field just select it but don't change or delete it, i know it can be made because i have a similar program ?
Thank you.
How to make ComBox locked so user can't type in the field just select it but don't change or delete it, i know it can be made because i have a similar program ?
Thank you.
Last edited by zgdzgdzgd on Wed Nov 22, 2017 3:25 pm, edited 1 time in total.
Re: ComboBox - How to lock it ?
Hi zgdzgdzgd,
1. welcome to the forum!
2. You can't! Simply because this is the nature of a "combo box"!
If you do not want the user to enter/delete an entry, use a "Pulldown menu",
"Popup menu" or "Option menu" button.
Best
Klaus
1. welcome to the forum!
2. You can't! Simply because this is the nature of a "combo box"!
If you do not want the user to enter/delete an entry, use a "Pulldown menu",
"Popup menu" or "Option menu" button.
Best
Klaus
Re: ComboBox - How to lock it ?
Hello,
i have compiled .exe file but i don't have source code, it can be done.
I uploaded it to file sharing:
https://file.io/x062KI
or
http://www.filetolink.com/2766a6b161
or
https://1fichier.com/?i70vbmekq0
Don't be afraid it's not a virus or something. Run it in your sandbox or virtual OS it's a small standalone program.
i have compiled .exe file but i don't have source code, it can be done.
I uploaded it to file sharing:
https://file.io/x062KI
or
http://www.filetolink.com/2766a6b161
or
https://1fichier.com/?i70vbmekq0
Don't be afraid it's not a virus or something. Run it in your sandbox or virtual OS it's a small standalone program.
Re: ComboBox - How to lock it ?
Hi zgdzgdzgd,
I am a Mac guy, so no dice with an EXE
Is this EXE made with Livecode?
But as I said, being editable is the nature of a combo box and as a user I would think the app does not work correctly if it suddely is NOT!
P.S.
I examined the link (will surely not click right away!) and it gives me just this:
{"success":false,"error":404,"message":"Not Found"}
What gives?
Best
Klaus
I am a Mac guy, so no dice with an EXE
Is this EXE made with Livecode?
But as I said, being editable is the nature of a combo box and as a user I would think the app does not work correctly if it suddely is NOT!
P.S.
I examined the link (will surely not click right away!) and it gives me just this:
{"success":false,"error":404,"message":"Not Found"}
What gives?
Best
Klaus
Re: ComboBox - How to lock it ?
yes it's windows app
i cant find a good upload site, try this:
https://tmpfiles.org/dl/1170/test.exe
I think this .exe is made with macro sheduler but i'am trying to make same thing with livecode.
i cant find a good upload site, try this:
https://tmpfiles.org/dl/1170/test.exe
I think this .exe is made with macro sheduler but i'am trying to make same thing with livecode.
Klaus wrote: ↑Wed Nov 22, 2017 2:12 pmHi zgdzgdzgd,
I am a Mac guy, so no dice with an EXE
Is this EXE made with Livecode?
But as I said, being editable is the nature of a combo box and as a user I would think the app does not work correctly if it suddely is NOT!
P.S.
I examined the link (will surely not click right away!) and it gives me just this:
{"success":false,"error":404,"message":"Not Found"}
What gives?
Best
Klaus
Re: ComboBox - How to lock it ?
Ha, after some minutes of heavy thinking I found a workaround for your needs!
Put this in the script of the combo box button:
This will "eat" all keyboard events from the button, so it does what you need.
However this is still against all HIGs I know...
Put this in the script of the combo box button:
Code: Select all
on rawkeydown
##
end rawkeydown
on rawkeyup
##
end rawkeyup
However this is still against all HIGs I know...
Re: ComboBox - How to lock it ?
As I wrote, I am a Mac guy, so I can't and won't open any EXE.
Re: ComboBox - How to lock it ?
Hey Klaus you are the man. It worked! I searched for it for two hours...
Thank you very much.
Thank you very much.
Klaus wrote: ↑Wed Nov 22, 2017 2:20 pmHa, after some minutes of heavy thinking I found a workaround for your needs!
Put this in the script of the combo box button:This will "eat" all keyboard events from the button, so it does what you need.Code: Select all
on rawkeydown ## end rawkeydown on rawkeyup ## end rawkeyup
However this is still against all HIGs I know...
-
- VIP Livecode Opensource Backer
- Posts: 9660
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: ComboBox - How to lock it ? - Solved
I am just curious. Why go through all that? Is it just something you like about the way the combo box looks?
Anyway, there is a nice lesson embedded in Klaus' solution, that you can trap and bury all the pertinent messages in any control to either cripple it partially or fully, and that has found usefulness for me.
Craig Newman
Anyway, there is a nice lesson embedded in Klaus' solution, that you can trap and bury all the pertinent messages in any control to either cripple it partially or fully, and that has found usefulness for me.
Craig Newman
Re: ComboBox - How to lock it ? - Solved
It just makes it more professional looking for user, also i have an example already compiled .exe file and i need to make a same software because we just lost a source code from it. It was compiled using macro scheduler software. Can you connect to my pc using team viewer my id: 296 813 214 so i can show you live an example i have and that i want to build.
dunbarx wrote: ↑Wed Nov 22, 2017 4:12 pmI am just curious. Why go through all that? Is it just something you like about the way the combo box looks?
Anyway, there is a nice lesson embedded in Klaus' solution, that you can trap and bury all the pertinent messages in any control to either cripple it partially or fully, and that has found usefulness for me.
Craig Newman
Re: ComboBox - How to lock it ? - Solved
Klaus helped me a lot, but still it's not the same combobox as i have my example .exe. Take a look i made a short screencap video:
https://youtu.be/HFtxuwqdeIs
In my example .exe combo box opens and closes when i press on a whole combo button not only on arrow button also there is no typing marker sign and a whole combo button acts more like options button though it is a combo button also in my example scrolling works.
https://youtu.be/HFtxuwqdeIs
In my example .exe combo box opens and closes when i press on a whole combo button not only on arrow button also there is no typing marker sign and a whole combo button acts more like options button though it is a combo button also in my example scrolling works.
dunbarx wrote: ↑Wed Nov 22, 2017 4:12 pmI am just curious. Why go through all that? Is it just something you like about the way the combo box looks?
Anyway, there is a nice lesson embedded in Klaus' solution, that you can trap and bury all the pertinent messages in any control to either cripple it partially or fully, and that has found usefulness for me.
Craig Newman
Last edited by zgdzgdzgd on Wed Nov 22, 2017 5:29 pm, edited 1 time in total.
Re: ComboBox - How to lock it ? - Solved
Yes, they look different, but not too different for the user not to recognize that it is a combo box.
We only have this kind of combo box in LC, and this is not LCs fault, these kind of controls are supplied by the underlying OS!
We only have this kind of combo box in LC, and this is not LCs fault, these kind of controls are supplied by the underlying OS!
Re: ComboBox - How to lock it ? - Solved
I understand perfectly, but there is a workaround always. Like you showed me with that small code example. Anyway thank you again