

Validate= 'key' ,validatecommand=(channel_vcmd, '%P' )) Main_frame, from_=0, #this is how to add it. Spinbox ( #I wanted to use a spin button. validate_channel_entry) #Call validate Channel number (make sure it is a number and within range of the device. Label (main_frame) #add a label for channel number selectĬhannel_entry_label = "Channel Number:"Ĭhannel_entry_id(row=curr_row, column=0, sticky= tk. W, padx=3, pady=3)Ĭhannel_entry_label = tk. device_id_id(row=curr_row,column=1, sticky= tk. device.unique_id #this is the device’s ID Label (main_frame) #I wanted to add the device IDĭevice_id_left_label = "Device Identifier: " #This is its labelĭevice_id_left_id(row=curr_row, column=0, sticky= tk. Frame ( self ) #Create the main code frame Creating the section of the code is pretty clear once you understand how it works.Here is the code and some useful comments (it is located just before the last bits of code from above): Unlike Visual Basic.NET or C#, the code to add these objects must be created manually, but it’s not as bad as you think.

By adding the user interface syntax first, it should make reading the library code calls easier to understand and more clear since you will have a more complete picture of the process. That is all the boiler plate code you need!īefore we get into the Universal Library calls, I thought it would be best to set up the user interface. # Start the example if this module is being run Super ( Py_JG02, self )._init_( master ) In the code window, add the following to add ‘links’ to tkinter and the Universal Library:įrom mcculw. The first thing we need to do is import support libraries.
