#1
|
|||
|
|||
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 Best regards, Harry |
#2
|
|||
|
|||
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") 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! |
#3
|
|||
|
|||
Re: how to show message in popup menu [lisp]
Thanks, that was exactly what I needed. So simple.....
Best regards Harry |
#4
|
||||
|
||||
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 |
#5
|
|||
|
|||
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]} "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 |
#6
|
|||
|
|||
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! |
#7
|
||||
|
||||
Re: how to show message in popup menu [lisp]
Hi,
thanks for the answers! :before-input does the trick for me. regards, Jaap |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | Rate This Thread |
|
|