Intel® Quartus® Prime Pro Edition User Guide: Scripting

ID 683432
Date 12/13/2021
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

3.1.20.9. init_tk (::quartus::misc)

The following table displays information for the init_tk Tcl command:

Tcl Package and Version

Belongs to ::quartus::misc

Syntax init_tk [-h | -help] [-long_help]
Arguments -h | -help Short help
  -long_help Long help with examples and possible return values
Description

Initializes a Tk window. If you are using Tk functionality in Tcl, you
must run this command first before running any Tcl scripts.
Example Usage
# Initialize the Tk library
init_tk

# Create a top level and add a title
toplevel .top
wm title .top "Hello World" 

# Add widgets
button .top.hello -text Hello -command {puts stdout "Hello, World!"}
pack .top.hello -padx 20 -pady 10

# Without "tkwait", the script finishes at this point and the
# window is destroyed. The "tkwait" command prevents the
# script from finishing until the you close the window.
tkwait window .top
Return Value Code Name Code String Return
TCL_OK 0 INFO: Operation successful

Did you find the information on this page useful?

Characters remaining:

Feedback Message