Hi
Im trying to add save and load functionality to my program and I am using pickle to take the information and dump it in a file. I have been able to pickle everything successfully except for my canvas object which just creates a massive error. My aim is to be able to first pickle the canvas (along with the other data) and subsequently unpickle the canvas with all of the objects which have been placed on it, in the correct place and...
User Profile
Collapse
-
Pickle a Tkinter Canvas
-
wow it works :) thank you so much your code is fantastic and with minimal modification this can easily be placed directly into my program.
i apologise for the late reply but i have been swamped over the last few weeks and have not had any time to work on my program
:)... -
-
this is perfect except how would you write isinstance? (its not a built in is it?)
i have taken in all of the other things people have written and just have one more question: i noticed that if i use the validatecommand function as used below then the validation is always one step behind. ie if the spinbox contains 5 and i change it to 6 it will verify the old value of 5 and then change the spinbox value of 6, thus it is always one...Leave a comment:
-
EDIT: also how would i write the validate function i had the idea of this (below) but it seems very inefficient there must be a better way
Code:def validate(input) for i in range (1000): if i == input: return True (...etc...)Leave a comment:
-
thank you so much :) when i return true then it validates every time, now all i need is get the spinbox value to start at a specific value, any ideas?Leave a comment:
-
Tkinter Spinbox
Hi
I need a spinbox which when created can read a variable (which is an integer) from another location and use that variable for the starting value. i also need to only allow integers be input into the text field by keyboard (and only has high as 999). lastly, whenever the spinbox value is changed (either by keyboard input or by clicking on the arrows) i need to be able to verify that it is an integer and then save its value into another...
No activity results to display
Show More
Leave a comment: