The first function is called when the mouse first enters the widget. Set functions to call whenever the mouse enters (goes over) or leaves the specified widget. In this case, make sure you set the optional parameter callFunction = False when you call the set XXX Function() of a widget. If you've got two widgets changing the same variable, say a Scale and a SpinBox, and you want a change in one widget to cause an update in the other, you might inadvertently end up stuck in a recursive loop, until the stack overflows. WARNING - it's possible to generate a RuntimeError. # set back to the default, but don't call the change functionĪpp.setRadioButton("song", "Killer Queen", callFunction=False)Īpp.addRadioButton("song", "Killer Queen")Īpp.addRadioButton("song", "Paradise City")Īpp.setRadioButtonChangeFunction("song", songChanged) Other widgets - it does the same as ChangeFunction.Entries & Buttons - it binds a function to the key.Labels & Images - it binds a function to the, making the widget clickable.Other widgets - it will set the command property for the underlying tkinter widget this may or may not do anything.Ĭreates a submit option for some widgets:. ![]() Buttons, Labels & Images - it is not available.Scales, OptionBoxes, SpinBoxes, ListBoxes, RadioButtons & CheckBoxes, Entries & TextAreas, and Properties - the function will be called each time the widget is changed.set XXX Function() which is now deprecated.īind the specified function to the named widget: These do similar things, so probably shouldn't both exist, but have evolved from a single. ![]() set XXX DragFunction(title, functions) call function(s) when the mouse is dragged in/out of the widget set XXX OverFunction(title, functions) call function(s) when the mouse enters/leaves the widget set XXX SubmitFunction(title, function) call a function when the widget is submitted set XXX ChangeFunction(title, function) call a function whenever the widget changes ![]() Built-in EventsĪppJar currently has four basic types of event you can register: The Button has an event automatically linked to it - whenever you press it, a function gets called. An event is just calling a function - you want an event to be generated every time the user does something, such as clicking a button, dragging a scale, or pressing a key.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |