Re: Q: How to Change Pmw.ComboBox width ??

Discussion in 'Python' started by Martin Franklin, Sep 26, 2003.

  1. On Fri, 2003-09-26 at 10:14, Camilo Olarte wrote:
    > Hello list,
    > I was trying to make a Pmw.ComboBox and while using it i
    > needed to change its width.
    > I tried to configure it's inner components directly like _listbox.config
    > but nothing changes..
    > By default in my computer this combobox width is of 12 (characters)
    > and since I am showing number of the month i need only 3 characters.
    > i could use a Pmw.Counter but my boss don't likes it's arrows :( ...
    >
    > Here is some sample code of what i'm doing.
    >
    > <PYTHON>
    > import Tkinter, Pmw
    > class DemoCombo:
    > def __init__(self, parent):
    > parent.configure(background = 'white')
    > arrmes = [1,2,3,4,5,6,7,8,9,10,11,12]
    > # Create and pack the dropdown ComboBox.
    > self.dropdown = Pmw.ComboBox(parent,label_text = 'Month:',
    > labelpos = 'n',scrolledlist_items = arrmes,
    > scrolledlist_usehullsize = 1,)


    You need to configure the Entry widget.....


    entry_width = 3


    so

    self.dropdown = Pmw.ComboBox(parent, label_text = 'Month:',
    labelpos = 'n', scrolledlist_items = arrmes,
    scrolledlist_usehullsize = 1, entry_width = 3)


    Regards
    Martin

    --
    Martin Franklin <>
     
    Martin Franklin, Sep 26, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marc
    Replies:
    0
    Views:
    393
  2. mark
    Replies:
    0
    Views:
    743
  3. Camilo Olarte

    Q: How to Change Pmw.ComboBox width ??

    Camilo Olarte, Sep 26, 2003, in forum: Python
    Replies:
    0
    Views:
    423
    Camilo Olarte
    Sep 26, 2003
  4. Gombos Katalin

    Pmw.ComboBox

    Gombos Katalin, Oct 20, 2003, in forum: Python
    Replies:
    1
    Views:
    598
    Eric Brunel
    Oct 20, 2003
  5. Gombos Katalin

    Pmw.ComboBox

    Gombos Katalin, Dec 10, 2003, in forum: Python
    Replies:
    0
    Views:
    383
    Gombos Katalin
    Dec 10, 2003
Loading...

Share This Page