User Profile
Collapse
-
Thank You! This is what i was trying to achieve. -
Thanks for the suggestion, but do you know how i can store strings in a list-like format, append strings to the end as I print, and use \n\ in them? a list wont work because it would display as [..., ..., ...]
any help would be appreciatedLeave a comment:
-
Console in Tkinter GUI
Hi Bytes Community!
I am using tkinter to create a GUI and was wondering how to make a "console" widget embedded in the GUI. Sort of like the python command line but inside the GUI
Thanks in advance! -
Thank You very much!
Your answer has increased my python knowledge and I am grateful for you consistently imparting to me great knowledge!
Thanks!Leave a comment:
-
Response
Bvdet,
I put
Code:self.frame = frame
NameError: global name 'frame' is not defined
and it points me to the self.frame = frame code.
Code:def interface(self): self.frame = frame self.stats1 = Button(self.frame, text='STATS', command=None) self.stats1.grid(row=1, column=0) self.stats2
Leave a comment:
-
Response
So i should replace 'root' with frame?
Code:# def interface(self): # self.stats1 = Button([U]frame[/U], text='STATS', command=None) # self.stats1.grid(row=1, column=0) # self.stats2 = Button([U]frame[/U], text='STATS', command=None) # self.stats2.grid(row=1, column=4) # if gi.turn == 1: # self.attack1 = Button([U]frame[/U], text='ATTACK', fg='red',
Leave a comment:
-
Strange .grid sectioning? Tkinter?
Hey Bytes Community!
I am currently using Tkinter to create a GUI window, and I ran into a problem. Here is my code:
Code:from Tkinter import * import random import gameinclude gi = gameinclude class App: def __init__(self, master): ########## #Menu Bar# ########## frame = Frame(master) frame.grid() menu = Menu(root)
-
Destroy Toplevel
Hello Bytes Community!
How do you destroy a toplevel application window in Tkinter?
sayi have
root window
and
[CODE]window = Toplevel()
window.destroy?[/CODE
How do i destroy the Toplevel?
thanks in advance, sorry for the weak code... -
-
Get Strings from Entry Boxes
Hey Bytes Community!
I am learning Tkinter GUI and have come across a problem.
Code:from Tkinter import * import random class App: def __init__(self, master): frame = Frame(master) frame.pack() menu = Menu(root) root.config(menu=menu) filemenu = Menu(menu) menu.add_cascade(label='File', menu=filemenu) filemenu.add_command(label='Practice',
-
.grid problem is freezing my GUI
With some tinkering with previous answers for previous questions, I have come across a new problem with my GUI. I cannot align with the grid (?)
example:
Code:from Tkinter import * import random class App: def __init__(self, master): frame = Frame(master) frame.pack() self.label = LabelFrame(frame, text='Battler III') self.label.pack() self.areBtn
-
thank you! my code works now! i will read the posting regulations and return if i ned help again.
^.^Leave a comment:
-
Takes 2 arguments? I gave one???!!!
Code:from Tkinter import * import random class App: def __init__(self, master): frame = Frame(master) frame.pack() self.label = LabelFrame(frame, text='Battler III') self.label.pack() self.arena = Button(frame, text='Arena Mode', relief=RAISED, command=self.arena) self.arena.grid(row=4) self.arena.pack() self.adven = Button(frame,text='Adventure Mode', relief=RAISED,
-
Thank you! this will make the message 20 characters!
I don't know what id do without this reply!
Arigatou GozaimasuLeave a comment:
-
Thank you for the answer! It works now and I can python away! Thanks!Leave a comment:
-
Getting rid of module naming
I have this program:
Code:class Cabbage: def __init__(self, height, bobnum): self.h = self.height self.b = self.bobnum x = cabbage(3, 7)
3
I want to remove the need to type cabbage in this,so i can just put
x.h and return
3.
Any help is appreciated
Thanks -
calling a function from a module in a class
I recently tried to start learning GUI for python, and reverted back to python 2.6.4
my question:
in python 3.1.1,:
>>>import title
>>>title.class. function()
>>>running program
in python 2.6.4:
>>>import title #working fine
>>>title.class. function()
then I get this:
unbound method must be called with class...
No activity results to display
Show More
Leave a comment: