CoCreate User Forum  

Go Back   CoCreate User Forum > Support > Customization

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 04-06-2005, 04:39 AM
Harry Harry is offline
Registered User
 
Join Date: Jan 2004
Posts: 85
Question how to show message in popup menu [lisp]

I like to use a little popup menu that shows a message for me. After pressing [OK], the menu will dissapear.

I started with this...

Code:
(defun show_msg (&key msg)
	;function: show message in window
	;date    : 11-03-2005
	;----------------------------------------------------------------------
	;input : msg [string], message to show
	;output: -
	
	(SD-CREATE-MENU "test_harry"
	:title "Attention!"
	:controlButtons :ok-cancel-help
	:contents

	)
	
;	(SD-CALL-DIALOG "test_harry"
;		:parent-shell nil
;		:attachment :bottomleft
;		:x-offset 0
;		:y-offset 0
;	)
);defun
But instead of three buttons [OK][CANCEL][HELP], I like to have one [OK] button. Has some else made this very generic code before?

Best regards,

Harry
Reply With Quote
  #2  
Old 04-06-2005, 06:46 AM
Andy Poulsen Andy Poulsen is offline
Administrator
 
Join Date: Apr 2003
Location: Fort Collins, Colorado
Posts: 273
Re: how to show message in popup menu [lisp]

Hi Harry,

I think you're making it too difficult for yourself -- see the documentation for the function sd-display-message and see if it does what you're looking for...

For example, you could just have
Code:
(sd-display-message "Hello Harry")
which would pop up a box with "Hello Harry" in it.

Enjoy!

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 04-08-2005, 05:03 AM
Harry Harry is offline
Registered User
 
Join Date: Jan 2004
Posts: 85
Re: how to show message in popup menu [lisp]

Thanks, that was exactly what I needed. So simple.....


Best regards Harry
Reply With Quote
  #4  
Old 04-11-2005, 10:29 PM
jkramer's Avatar
jkramer jkramer is offline
Registered User
 
Join Date: Oct 2002
Location: the Netherlands
Posts: 382
Re: how to show message in popup menu [lisp]

Hi,

is there a way of making a "sd-display-message"-message appear as soon as someone clicks on the macro in the toolbox?
For instance, I made a small Lisp routine with a "calculator" for bend reliefs. When people use it, I want a message to appear that explains the meaning of the variables BEFORE they start filling them in...

Thanks!
Regards,
Jaap
Reply With Quote
  #5  
Old 04-11-2005, 11:07 PM
dorothea dorothea is offline
Registered User
 
Join Date: Nov 2002
Location: Nufringen near Stuttgart
Posts: 157
Re: how to show message in popup menu [lisp]

Hi Jaap,

You could try it with the following keyword of sd-defdialog:
Code:
 :precondition {LISP-form [nil]}
The documentation says:
"This form will be executed before the dialog appears on the screen. If the form is supplied and does not return :OK, the dialog will be cancelled (see Preconditions)."

Dorothea
Reply With Quote
  #6  
Old 04-11-2005, 11:34 PM
Andy Poulsen Andy Poulsen is offline
Administrator
 
Join Date: Apr 2003
Location: Fort Collins, Colorado
Posts: 273
Re: how to show message in popup menu [lisp]

Hello Jaap,

If you want a single message box to describe all the variables, Dorothea's suggestion is one way to do it. Another is to use the ":after-initialization" keyword as part of your dialog definition.

If you want a separate message for each variable, a couple of ways you can do it are to use the ":before-input" or ":show-input-tool" keywords as part of each variable's definition. This will allow you to display your message when the user clicks on the button of the variable to enter the data, or when the focus automatically moves to that variable (and can give you other flexibility as well).

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
  #7  
Old 04-11-2005, 11:42 PM
jkramer's Avatar
jkramer jkramer is offline
Registered User
 
Join Date: Oct 2002
Location: the Netherlands
Posts: 382
Re: how to show message in popup menu [lisp]

Hi,

thanks for the answers!
:before-input does the trick for me.

regards,
Jaap
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 04:17 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.