change width of a ComboBoxDialog widget?

Help
Emma
2014-05-14
2014-06-03
  • Emma

    Emma - 2014-05-14

    Hi all

    It seems this should be simple, but I've looked through the documentation, and I just can't figure it out. I would like to change the initial/default width of a ComboBoxDialog widget. I suspect I need to use an option which is inherited, since there is no direct "width" option in the ComboBoxDialog widget. But I can't find any examples of this.

    Does it have something to do with the "hull" of the widget? If someone can point me to some example usage of the hull component, that would be great.

    Thank you!
    Emma

     
  • Emma

    Emma - 2014-05-15

    I figured it out. As I suspected, once you know how it is so easy :) For the record, and in case others are wondering, here is how you do it. You access the component widgets ListBox:

    myDialog = Pmw.ComboBoxDialog(parent)
    myDialog.component('listbox').configure(height=20)

     
  • Greg McFarlane

    Greg McFarlane - 2014-05-17

    Hi Emma,

    You can create and configure in one line:

    myDialog = Pmw.ComboBoxDialog(parent, listbox_height=20)

    or use the short form of the option to configure:

    myDialog.configure(listbox_height=20)

    Hope this helps.

     
  • Emma

    Emma - 2014-06-03

    Thank you Greg!

     

Log in to post a comment.