How to create a popup window
Hi everybody,
I would like to know the command to create a popup window like in the attached file:
I know that the window will appear by usage of command:
tk_messageBox -message 'some message' -type yesno
But is it possible to define a user specific input and add a image?
Thanks in advance
Find more posts tagged with
thank you for the quick answer and the link! This is the answer to my questions and I'll try to build up me dialog box!
Many thanks
Hi,
which comand do I have to use instead of 'set w [hwtk::demo::getpreviewframe]' to set this variable in HyperMesh?
# HWVERSION_14.0_Feb 5 2016_17:42:29
#Get preview frame
set w [hwtk::demo::getpreviewframe]
set input [hwtk::inputdialog -initialvalue testing -text testing -inputtype str \
-x [winfo rootx $w] -y [winfo rooty $w]]
tk_messageBox -title 'hwtk::inputdialog' -message 'Return value: $Input'
Thanks in advance!
Hi,
Try:
set w [toplevel .mydialog] instead of 'set w [hwtk::demo::getpreviewframe]
I would recommend you to manually create label, entry box and buttons instead of hwtk::inputdialog.
Hi,
thanks for your answer!
ok what do you mean by manually create instead of hwtk::inputdialoge?
as mentoined before, I would like to build a dialog box like in the picture in my first post...
do you have an example how to do this?
thanks in advance
Could you please give me a hint, how to add an image?
Like shown in my first post on the upper right hand side...
thanks in advance
Regards
0815
18 minutes ago, Livil Lyle said:
Thank you very much!
Regards
Hi,
I created my pop up windows and everthing works fine, if I start them one by one!
In a second step I would like to summarize them in one tcl-file.
Therefore I did something like this:
set question1 [tk_messageBox -message 'Do you want to execute first pop up window?' -type yesno -icon question]
switch -- $question1 {
yes {*evaltclscript 'my_first_popup.tcl' 0
}
no {}
}
set question2 [tk_messageBox -message 'Do you want to execute second pop up window?' -type yesno -icon question]
switch -- $question2 {
yes {*evaltclscript 'my_second_popup.tcl' 0
}
no {}
}
The issue is, that if I say 'yes' to the first question ($question1 ), the second message box ($question2) appears too...
which command do I have to use if I want the second messagebox to appear after finishing the execution of the first popup.tcl?
Thanks in advance
Hi @8015,
you will have to tie the *evaltclscript 'my_second_popup.tcl' to a proc which runs after the close of your my_first_popup.tcl. Please see the attachment on how you can do the same.
Hi,
It is possible, you will have to create a GUI with the help of tk.
https://www.tutorialspoint.com/tcl-tk/tk_basic_widgets.htm
You can also refer to HWTK GUI Toolkit available in Start>Programs>Altair Hyperworks 2017>Tools