CoCreate User Forum  

Go Back   CoCreate User Forum > Support > Customization

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 05-27-2005, 02:26 AM
ceuro ceuro is offline
Registered User
 
Join Date: Nov 2004
Posts: 18
Action attached to the label of a variable

Hi, I want to set a value to a variable of a dialog box when the user
clicks on the label of the variable, I don't want to have other dialog like
the option show-input-tool does, the value straight in the field.
Any suggestion ?
Thanks
Reply With Quote
  #2  
Old 05-27-2005, 05:55 AM
Andy Poulsen Andy Poulsen is offline
Administrator
 
Join Date: Apr 2003
Location: Fort Collins, Colorado
Posts: 273
Re: Action attached to the label of a variable

Hi,

I'm not sure if this is what you're looking for, but the keyword :before-input allows you to execute some code when the user clicks on the variable. For example, in the following code, clicking the label of the variable will set its value to the value of the global variable *my-var*:
Code:
(defvar *my-var* 24) ;; define global variable

(sd-defdialog 'my_test
   :variables
	'((var1 :value-type :integer
		:before-input (setq var1 *my-var*))
	  (var2 :value-type :integer
		:after-input (setq *my-var* var2))
	  ))
The second variable shows how to use the :after-input keyword to execute some code after the user has entered the value of a variable. Note that in both the :before-input and :after-input keywords that you can do many other things (including working with additional variables) besides what is shown above.

Does this help?

Good luck!

andy
__________________
Andy Poulsen
AI MAXTools: Dream. Design. Done. It's that easy!
Add-ins bringing new functionality and speed to Creo Elements/Direct and CoCreate products. Now available for v17-v20+!
See them in action at www.ai-maxtools.com and then try them for yourself -- FREE!
Reply With Quote
  #3  
Old 05-27-2005, 06:30 AM
ceuro ceuro is offline
Registered User
 
Join Date: Nov 2004
Posts: 18
Re: Action attached to the label of a variable

Thanks, it works!!!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 12:26 AM.



Hosted by SureServer    Forums   Modeling FAQ   Macro Site   Vendor/Contractors   Software Resellers   CoCreate   Gallery   Home   Board Members   Regional User Groups  By-Laws  

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.