PDA

View Full Version : UI window without 'OK'/'Cancel'



nickdigital
08-09-2012, 07:15 PM
Is it possible to have a UI window where the ctlbuttons are the equivalent of hitting "ok"?

This way the user doesn't have to hit the ctl button to set a value and then "ok".

xchrisx
08-09-2012, 09:39 PM
as far as I am aware of, in Lscripting you are pretty much stuck with OK Cancel :( Would love to have the ability to change it as well.

jeric_synergy
08-10-2012, 01:47 AM
?? You mean like the user doesn't make any input at all?

Is it possible to set a DEFAULT button, so eg OK is already selected?

nickdigital
08-10-2012, 02:25 AM
as far as I am aware of, in Lscripting you are pretty much stuck with OK Cancel :( Would love to have the ability to change it as well.
I can live with that, thx.


?? You mean like the user doesn't make any input at all?

No, the user still has to hit a button. Hitting the button invokes the command and then closes the window at the same time versus the user hitting the button to select the option and then hitting 'ok' to execute.

OnlineRender
08-10-2012, 06:21 AM
can you not force refresh it ? sorry only dabbled in Lscript

jeric_synergy
08-10-2012, 09:08 AM
No, the user still has to hit a button. Hitting the button invokes the command and then closes the window at the same time versus the user hitting the button to select the option and then hitting 'ok' to execute.
Ahhh. Yes, that would make things brisker. :thumbsup:

xchrisx
08-10-2012, 09:27 AM
ok i was wrong :) Figured out a way to close the dialog when a ctlbutton is pressed using reqabort.


@warnings
@version 2.2

@script generic
generic
{
reqbegin("Quit Test");
reqsize(244,128);

c1 = ctlbutton("Quit",80,"button_callback_c1");
ctlposition(c1,75,44);

return if !reqpost();


reqend();
}

button_callback_c1
{
reqabort();
}

nickdigital
08-10-2012, 09:33 AM
ok i was wrong :) Figured out a way to close the dialog when a ctlbutton is pressed using reqabort.



Say whaaaaa. Definitely gonna give this a go. After looking at your code it seems obvious. But that's what happens when your brain has the consistency of warm jello after a long week of meetings and Siggraph fun. The week isn't even over...:eek:

xchrisx
08-10-2012, 09:47 AM
Understandable, our week here as been pretty scattered due to siggraph and other things as well.

Blochi
08-25-2012, 01:22 PM
Here's a less known tricks with the OK/Cancel button:

Even though they are always added to the bottom of defined requester size, this additional space is actually addressable. So you can in fact use ctlposition to place a third button between OK and Cancel. I use that in the latest Smart IBL. You can also place a ctlinfo over one of the buttons, that is filled with a drawrectangle of the background color. Then the OK or Cancel button is hidden. This is a bit dirty, because they will still show up on roll-over, though...