deselect [number] box after input
Is there any way to deselect a number box after input is finished other then mouse-clicking into empty space?. When finishing with RETURN the number-box stays selected. With TAB it can move to the next number-box, but no way to deselect except by clicking anywhere in the empty space.
select [message]
|
thispatcher [object]
this is pretty annoying sometimes when there are numbderboxes in a bpatcher,
you can not even deselect them by clicking somewhere else after you entered
something using the keyboard.
for entry-only numberboxes it might be wise to make your own using [lcd].
pid: I tried to connect the number box the the thispatcher object in a bpatcher - nothing happens, number-box still selected. But may be you meant something different?
Roman Thilenius: Sorry, but I do not understand how to do that. If I open an LCD I can write something into it with message [ascii $1] but then it is stuck inside LCD and I cannot get it out. And I cannot find any description for getting it sent out to an output of the LCD. I need the number box to make an input of numbers to send them to another object, but then after the input is finished, I want it to deselect. I do not see how I can do that with LCD.
Both: Thanks for your efforts.
@Ullstein: that's what pid meant.
@roman, do you have an example? I doubt it's still the case since Max 5.
Thanks Emmanuel Jourdan. Yes it works, but unfortunately only outside of a bpatcher. But putting your little patch outside the bpatcher, works.
Thanks to you and pid
All the best
@Emmanuel &c74: I would really like to see an attribute for all objects which can have focus, to free the focus after a given time. Lets call it free_focus...
Stefan
@Ullstein: you can send a message to the main patcher to select itself.
Sorry ,but I am afraid this does not work. At least not with t a bpatcher. Your earlier sugestion works very well, this one does not succeed. Still, many thanks for taking care, I really appreciate. Thank you.
It's really working here, with the latest Max version.
eij: right, it occurs in max4.
but :(
"but then it is stuck inside LCD and I cannot get it out."
it is of course quite some work to use lcd for things like that.
it also needs a lot of CPU, but for input elements this should not matter.
lcd has mouse drag position output, and also mouse over tracking, the
latter has to be turned on as it is off by default.
the mouse drag tracking also works when dragging outside the lcd, just
like you would exspect from a GUI element.
after you wrote something in an lcd you would do "clear", and then write the
next thing into it.
everything in background, which is overlapped by something dynamic, must
be redrawn now any time when you change something in foreground.
so if you want to have a black background, then a blue rect with white
numbers, you would initialize it by
brgb 0 0 0, clear, paintrect 25 25 75 75 0 0 200,
and then you send the "write" or ascii" stuff.
when the mousemovement now changes the number from 7 to 13,
you would have to repeat writing "paintrect 25 25 75 75 0 0 200"
in order to delete the 7 before writing the 13.
i´ve used lcd for all kind of GUI elements such as multiple sliders
in one box, XY fields limited to a circle, clickable menus, or sliders
which are bipolar, diagonal, or change color and size when moved.
it is also great for making simple little buttons or number boxes, which
is what you should start with. ^^
-110
Thanks for all your help. I managed to make what I need with the suggestion that pid and Emmanuel made. And thank you Roman for your continuation.
All the best
So, what about the "free_focus" attribute that Stefan suggested? Was it ever considered an option?
Cheers