#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    67
    Rep Power
    11

    Text box question?


    So if i want to enter weapondescription with a space before it at the end of line 3, is this code correct?
    Code:
    self.text.insert(3.0, END, " ", weapondescription)
    Thanks.
    Before you criticize someone, walk a mile in their shoes, that way when you do criticize them, you're a mile away and you have their shoes!
  2. #2
  3. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Does it work Baltor? I've looked at the docs on Pythonware.com and it seems to have the wrong number or arguments.. Here's the info I found on the insert method from http://www.pythonware.com/library/tk...13-methods.htm

    Code:
    insert(index, items) 
    Insert one or more items at given index (this works as for Python lists; index 0 is before the first item). Use END to append items to the list. Use ACTIVE to insert items before the the active (underlined) item.
    You might want to mess around with the format for a while and see what works.. but you shouldn't use ',' with strings inside functions i'd try using '+' instead or use string formatting i.e ' %s' % ('string'). Both of which look nicer to me anyway

    Have fun,
    Mark.
  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    67
    Rep Power
    11
    Pythonware.com, I'll check it out.

IMN logo majestic logo threadwatch logo seochat tools logo