skill form create

A

arnoli

Guest
I want to create a option form,which has only two button --Hide cancel.as
the virtuoso Create Label
Form .who can help me .3Q

--
Message posted using http://www.talkaboutcad.com/group/comp.cad.cadence/
More information at http://www.talkaboutcad.com/faq.html
 
Hi Arnoli,

I would advice to create a form (hiCreateAppForm) and set the ?
buttonLayout to 'HideCancel. This is valid for options forms, i.e ?
formType 'options (which is not the default).
For more information, Please give a look to the Following Cadence
documentation : Cadence User Interface SKILL Reference
<yourCadenceInstallDir>/doc/skuiref/skuiref.pdf

Enjoy yourself

Riad.
 
thanks for you answer,I tried it before,but when I knock the "Hide" ,the
form didn't hide and no reaction.can you tell me why?thanks

--
Message posted using http://www.talkaboutcad.com/group/comp.cad.cadence/
More information at http://www.talkaboutcad.com/faq.html
 
Hi Arnoli,

I don't actually know why things are not working correctly at your
side but I'm afraid you are not using the options forms as expected.
That's my guess and I'm most likely wrong.
Anyway, I would like to remind you the following (from the Cadence
User Interface SKILL Reference doc) :
"Options forms are used only when entering graphical data. Use an
options form with enterFunctions only".

I quickly wrote this piece of skill, load it into your session and the
type myEnterPointFunc() into your CIW

----------------------------------------------------------------------------------------------------------------
; Skill File starts here
;
; pointDone()
;
procedure(pointDone( w done pts )
let( ()
if( done then
hiDisplayAppDBox( ?name
'rkWarning ?dboxBanner "Point Selection Success"
?dboxText sprintf(nil "Point selected is : %L" car(pts))
?buttonLayout 'Close
)
else
hiDisplayAppDBox( ?name
'rkWarning ?dboxBanner "Point Selection Failure"
?dboxText "NO POINT SELECTED"
?buttonLayout 'Close
)
); if
); let
); procedure
;
; myEnterPointFunc()
;
procedure(myEnterPointFunc()
let(()
;unless(boundp('mySampleForm)
myCreateForm()
;);unless
enterPoint(
?prompts list( "Enter a point.")
?form mySampleForm
?doneProc "pointDone"
);enterPoint
);let
);procedure
;
; myCreateForm()
;
procedure(myCreateForm()
let((width)
myLabelField = hiCreateLabel(
?name 'myLabelField
?labelText "Click Hide and click somewhere in the layout window"
?justification 'center
); hiCreateLabel
hiCreateAppForm(
?name 'mySampleForm
?formTitle "Sample Form"
?formType 'options
?buttonLayout 'HideCancel
?fields list(myLabelField)
); hiCreateAppForm
); let
); procedure
;
; Skill File ends here
----------------------------------------------------------------------------------------------------------------

It would be more helpful for us to get your skill if you want more
efficient support.
I'm not the expert of the options forms but I'm doing my best to help
you ;-)
May other folks have better ideas !

Enjoy,

Riad.
 
thanks for your help!
yes,I load you program at my computer,and enter
myEnterPointFunc() into the CIW, then Display a Box .but the same as my
program,I clock 'Hide ,nothing happen.I hope you can load you program in
you computer.
Most of my program as you. I don't know why?

--
Message posted using http://www.talkaboutcad.com/group/comp.cad.cadence/
More information at http://www.talkaboutcad.com/faq.html
 
I hope when I enter myEnterPointFunc() it can display the APPform. so in
you program I add
(setq MyForm
hiCreateAppForm(
?name 'mySampleForm
?formTitle "Sample Form"
?formType 'options
?buttonLayout 'HideCancel
?fields list(myLabelField)
)); hiCreateAppForm

hiDisplayForm(MyForm)




--
Message posted using http://www.talkaboutcad.com/group/comp.cad.cadence/
More information at http://www.talkaboutcad.com/faq.html
 
Hi Arnoli,

I'm sorry but when I hit the 'hide' button in my environment (icfb -W
--> 5.10.41.500.5.98), the form gets hidden ...
When you type myEnterPointFunc() into your CIW, the Form comes up.
Click 'hide' and then click somewhere in the layout. The form should
be hidden !
I don't think you need the hiDisplayForm(MyForm), the enterfunction
will do it ....
Could you please cross-check ?

Will give it a try this evening after work.

Riad.
 
Riad KACED wrote, on 03/27/08 12:25:
Hi Arnoli,

I'm sorry but when I hit the 'hide' button in my environment (icfb -W
--> 5.10.41.500.5.98), the form gets hidden ...
When you type myEnterPointFunc() into your CIW, the Form comes up.
Click 'hide' and then click somewhere in the layout. The form should
be hidden !
I don't think you need the hiDisplayForm(MyForm), the enterfunction
will do it ....
Could you please cross-check ?

Will give it a try this evening after work.

Riad.

You definitely should not use hiDisplayForm with an options form. The
whole point of an options form is that it will be displayed during an
enter function (often via the F3 key).

hiDisplayForm must only be used with nonoptions forms. Similarly,
enterfunctions must only be used with options forms. If you don't
specify the ?formType properly, then it will definitely not work properly...

Riad's code is fine. Should behave properly. Whether the form comes up
initially is controlled via the Tools->User Preferences, "Options
Displayed when commands start".

If you want the form to always come up, regardless of the user
preference, you can do:

procedure(myEnterPointFunc()
let(()
;unless(boundp('mySampleForm)
myCreateForm()
;);unless
enterPoint(
?prompts list( "Enter a point.")
?form mySampleForm
?doneProc "pointDone"
; ensure options form always is displayed at the start.
?alwaysMap t
);enterPoint
);let

);procedure

Otherwise you can just hit "F3" to toggle the appearance of the options form.

Regards,

Andrew.
 

Welcome to EDABoard.com

Sponsor

Back
Top