Started by khann ·
2010-04-21 02:05 UTC ·
6 replies · SMF topic #1263
khann
2010-04-21 02:05 UTC
Hi.
Just After
(setq *ODCL_Proj_Name (dcl_project_import *Temp_ODCL_Form nil nil))
Before (dcl_Form_Show *Temp_Form )
Can I do some action on the Control in the Form?
Like writing text on the textbox?
Any help will be appreciate.
Thanks.
owenwengerd
2010-04-21 04:28 UTC
You can do that in the form's OnInitialize event handler function.
khann
2010-04-21 04:34 UTC
:)
Thanks. I just got it.
khann
2010-04-21 06:20 UTC
And there,
I think the form is ready to show but it still waiting.
Before showing the form I'm getting number with (getreal ).
But the form keeps its focus then I need click the CAD Screen to come back.
I'm loading a Modaless form and before showing the form need user input number value.
The form designed has Keep Focus Ture property. Does this matter?
Thanks.
fred_tomke
2010-04-21 08:20 UTC
Yes, it may. You can cange the status of the property for the time of getreal. Another idea would be to use dcl_setcmdbarfocus to change the focus to the command-line.
(dcl_control_setkeepfocus MyProj_MyForm nil)
(dcl_setcmdbarfocus)
(setq reaNumber (getreal "\nNew value: "))
(dcl_control_setkeepfocus MyProj_MyForm T)
(dcl_controlsetfocus MyProj_MyForm_MyControl)
BTW: why don't you create a textbox for input the needed value?
Fred
fred_tomke
2010-04-21 08:27 UTC
I've just read your post once again. My first answer depends on the case the form is already visible and the user shall input something.
But did I understand you right, that you want to let the user input a number value between (dcl_form_show ) and before the form appears after finishing OnInitialize? It may be that it wouldn't work properly.
I'd either prefer to let the user input a number before (dcl_form_show ) or set a default number and let the user change the value in the form in a textbox with NumberStyle.
Fred
khann
2010-04-22 02:31 UTC
Thanks Fred, for your reply.
I make it out like this way.
Before get in "form_OnInitialize" routine , I've packed up user input values on a List Var of global variable.
At end of this sub function I call the (dcl_form_show).
Then in the "form_OnInitialize" routine, I set values in the TextBox Control.