Can I write some text on the Control before form_show ?

Started by khann, April 20, 2010, 07:05:10 PM

Previous topic - Next topic

khann

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

You can do that in the form's OnInitialize event handler function.
Owen Wengerd (Outside The Box) / ManuSoft

khann


khann

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

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.

Code (autolisp) Select
(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
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

Fred Tomke

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
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

khann

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.