grid scrollbars in dialog insanity

i'm trying to get scrollbars for a wx.grid in a wx.dialog. This is my
original code, which has a resizable dialog but no scrollbars for the
grid:

class DialogChemicalTable(wx.Dialog):
    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.Dialog.__init__(self, id=wx.ID_ANY,
            name='DialogChemicalTable', parent=prnt,
            #pos=wx.Point(780, 336),
            #size=wx.Size(598, 411),
            style=wx.RESIZE_BORDER | wx.DEFAULT_DIALOG_STYLE,
            title='Edit Chemical Table')
        # panels
        panelMain = wx.Panel(self, wx.ID_ANY)
        panelTable = wx.Panel(panelMain, wx.ID_ANY)
        panelBottom = wx.Panel(panelMain, wx.ID_ANY)
        panelBottom.SetBackgroundColour('gray')
        grid = wx.grid.Grid(panelTable, -1)
        table = ChemicalGridTable()
        grid.SetTable(table, True)
        boxSizerTable = wx.BoxSizer(wx.VERTICAL)
        boxSizerTable.Add(grid)
        panelTable.SetSizer(boxSizerTable)

it was suggested i make the following changes, but this produces a
dialog that is not resizable (although the grid is large enough to not
need scrollbars):

        # panels
        #panelMain = wx.Panel(self, wx.ID_ANY)
        panelTable = wx.Panel(self, wx.ID_ANY)
        panelBottom = wx.Panel(self, wx.ID_ANY)
        panelBottom.SetBackgroundColour('gray')

        grid = wx.grid.Grid(panelTable, -1)
        table = ChemicalGridTable()
        grid.SetTable(table, True)

        boxSizerTable = wx.BoxSizer(wx.VERTICAL)
        boxSizerTable.Add(grid)

        panelTable.SetSizer(boxSizerTable)

        boxSizerBottom = wx.BoxSizer(wx.HORIZONTAL)

        # navigation buttons
        buttonUpFirst = wx.BitmapButton(bitmap = wx.Bitmap('images/
UpFirst.png', wx.BITMAP_TYPE_PNG), parent = panelBottom, id =
wx.ID_ANY, name = "upFirst")
        buttonUpFirst.SetToolTip(wx.ToolTip("Up to first entry"))
        buttonUp = wx.BitmapButton(bitmap = wx.Bitmap('images/up.png',
wx.BITMAP_TYPE_PNG), parent = panelBottom, id = wx.ID_ANY, name =
"up")
        buttonUp.SetToolTip(wx.ToolTip("Up one entry"))
        buttonDown = wx.BitmapButton(bitmap = wx.Bitmap('images/
down.png', wx.BITMAP_TYPE_PNG), parent = panelBottom, id = wx.ID_ANY,
name = "down")
        buttonDown.SetToolTip(wx.ToolTip("Down one entry"))
        buttonDownLast = wx.BitmapButton(bitmap = wx.Bitmap('images/
DownLast.png', wx.BITMAP_TYPE_PNG), parent = panelBottom, id =
wx.ID_ANY, name = "downLast")
        buttonDownLast.SetToolTip(wx.ToolTip("Down to last entry"))

        staticBoxSizerNavigate =
wx.StaticBoxSizer(wx.StaticBox(panelBottom, -1,"Navigate"),
wx.HORIZONTAL)
        staticBoxSizerNavigate.Add(buttonUpFirst)
        staticBoxSizerNavigate.Add(buttonUp)
        staticBoxSizerNavigate.Add(buttonDown)
        staticBoxSizerNavigate.Add(buttonDownLast)

        boxSizerBottom.Add(staticBoxSizerNavigate, 1, wx.LEFT)

        # edit buttons
        buttonPost = wx.BitmapButton(bitmap = wx.Bitmap('images/
Post.png', wx.BITMAP_TYPE_PNG), parent = panelBottom, id = wx.ID_ANY,
name = "upFirst")
        buttonPost.SetToolTip(wx.ToolTip("Save changes"))
        buttonCancel = wx.BitmapButton(bitmap = wx.Bitmap('images/
cancel.png', wx.BITMAP_TYPE_PNG), parent = panelBottom, id =
wx.ID_ANY, name = "up")
        buttonCancel.SetToolTip(wx.ToolTip("Exit and do not save
changes"))
        staticBoxSizerEdit =
wx.StaticBoxSizer(wx.StaticBox(panelBottom, -1,"Edit"), wx.HORIZONTAL)
        staticBoxSizerEdit.Add(buttonPost)
        staticBoxSizerEdit.Add(buttonCancel)

        boxSizerBottom.Add(staticBoxSizerEdit, 1, wx.CENTER)
        dialogBoxSizer = wx.BoxSizer(wx.VERTICAL)
        dialogBoxSizer.Add(self, proportion=1, flag=wx.EXPAND)
        panelBottom.SetSizer(boxSizerBottom)

        boxSizerMain = wx.BoxSizer(wx.VERTICAL)
        boxSizerMain.Add(panelTable, 1, wx.ALIGN_TOP | wx.EXPAND)
        boxSizerMain.Add(panelBottom, 0, wx.ALIGN_BOTTOM | wx.EXPAND)

        self.SetSizerAndFit(boxSizerMain)
        self.Layout

        self.SetSizer(dialogBoxSizer)
        self.Layout()

        self.Center()
        self.Show(True)

any help would be appreciated.

thanks,
bob k.

Please make a runnable, small as possible, sample application that demonstrates the problem, let us know the platform and wx version, and attach it to your mail. MakingSampleApps - wxPyWiki

···

On 7/7/11 10:51 AM, BobK wrote:

i'm trying to get scrollbars for a wx.grid in a wx.dialog. This is my
original code, which has a resizable dialog but no scrollbars for the
grid:

class DialogChemicalTable(wx.Dialog):
     def _init_ctrls(self, prnt):
         # generated method, don't edit
         wx.Dialog.__init__(self, id=wx.ID_ANY,
             name='DialogChemicalTable', parent=prnt,
             #pos=wx.Point(780, 336),
             #size=wx.Size(598, 411),
             style=wx.RESIZE_BORDER | wx.DEFAULT_DIALOG_STYLE,
             title='Edit Chemical Table')
         # panels
         panelMain = wx.Panel(self, wx.ID_ANY)
         panelTable = wx.Panel(panelMain, wx.ID_ANY)
         panelBottom = wx.Panel(panelMain, wx.ID_ANY)
         panelBottom.SetBackgroundColour('gray')
         grid = wx.grid.Grid(panelTable, -1)
         table = ChemicalGridTable()
         grid.SetTable(table, True)
         boxSizerTable = wx.BoxSizer(wx.VERTICAL)
         boxSizerTable.Add(grid)
         panelTable.SetSizer(boxSizerTable)

it was suggested i make the following changes, but this produces a
dialog that is not resizable (although the grid is large enough to not
need scrollbars):

--
Robin Dunn
Software Craftsman

Files sent. Thank you.

···

On Jul 7, 7:53 pm, Robin Dunn <ro...@alldunn.com> wrote:

On 7/7/11 10:51 AM, BobK wrote:

> i'm trying to get scrollbars for a wx.grid in a wx.dialog. This is my
> original code, which has a resizable dialog but no scrollbars for the
> grid:

> class DialogChemicalTable(wx.Dialog):
> def _init_ctrls(self, prnt):
> # generated method, don't edit
> wx.Dialog.__init__(self, id=wx.ID_ANY,
> name='DialogChemicalTable', parent=prnt,
> #pos=wx.Point(780, 336),
> #size=wx.Size(598, 411),
> style=wx.RESIZE_BORDER | wx.DEFAULT_DIALOG_STYLE,
> title='Edit Chemical Table')
> # panels
> panelMain = wx.Panel(self, wx.ID_ANY)
> panelTable = wx.Panel(panelMain, wx.ID_ANY)
> panelBottom = wx.Panel(panelMain, wx.ID_ANY)
> panelBottom.SetBackgroundColour('gray')
> grid = wx.grid.Grid(panelTable, -1)
> table = ChemicalGridTable()
> grid.SetTable(table, True)
> boxSizerTable = wx.BoxSizer(wx.VERTICAL)
> boxSizerTable.Add(grid)
> panelTable.SetSizer(boxSizerTable)

> it was suggested i make the following changes, but this produces a
> dialog that is not resizable (although the grid is large enough to not
> need scrollbars):

Please make a runnable, small as possible, sample application that
demonstrates the problem, let us know the platform and wx version, and
attach it to your mail.MakingSampleApps - wxPyWiki

--
Robin Dunn
Software Craftsmanhttp://wxPython.org

Files sent. Thank you.

can't see them attached here?

Werner

···

On 07/09/2011 03:06 PM, BobK wrote:

On Jul 7, 7:53 pm, Robin Dunn<ro...@alldunn.com> wrote:

On 7/7/11 10:51 AM, BobK wrote:

i'm trying to get scrollbars for a wx.grid in a wx.dialog. This is my
original code, which has a resizable dialog but no scrollbars for the
grid:
class DialogChemicalTable(wx.Dialog):
      def _init_ctrls(self, prnt):
          # generated method, don't edit
          wx.Dialog.__init__(self, id=wx.ID_ANY,
              name='DialogChemicalTable', parent=prnt,
              #pos=wx.Point(780, 336),
              #size=wx.Size(598, 411),
              style=wx.RESIZE_BORDER | wx.DEFAULT_DIALOG_STYLE,
              title='Edit Chemical Table')
          # panels
          panelMain = wx.Panel(self, wx.ID_ANY)
          panelTable = wx.Panel(panelMain, wx.ID_ANY)
          panelBottom = wx.Panel(panelMain, wx.ID_ANY)
          panelBottom.SetBackgroundColour('gray')
          grid = wx.grid.Grid(panelTable, -1)
          table = ChemicalGridTable()
          grid.SetTable(table, True)
          boxSizerTable = wx.BoxSizer(wx.VERTICAL)
          boxSizerTable.Add(grid)
          panelTable.SetSizer(boxSizerTable)
it was suggested i make the following changes, but this produces a
dialog that is not resizable (although the grid is large enough to not
need scrollbars):

Please make a runnable, small as possible, sample application that
demonstrates the problem, let us know the platform and wx version, and
attach it to your mail.MakingSampleApps - wxPyWiki

--
Robin Dunn
Software Craftsmanhttp://wxPython.org

now???

DialogChemicalTable (Bob-PC).py (4.62 KB)

rakPhoto.py (2.71 KB)

···

-----Original Message----- From: werner Sent: Saturday, July 09, 2011 11:10 AM To: wxpython-users@googlegroups.com Subject: Re: [wxPython-users] Re: grid scrollbars in dialog insanity

On 07/09/2011 03:06 PM, BobK wrote:

Files sent. Thank you.

can't see them attached here?

Werner

On Jul 7, 7:53 pm, Robin Dunn<ro...@alldunn.com> wrote:

On 7/7/11 10:51 AM, BobK wrote:

i'm trying to get scrollbars for a wx.grid in a wx.dialog. This is my
original code, which has a resizable dialog but no scrollbars for the
grid:
class DialogChemicalTable(wx.Dialog):
      def _init_ctrls(self, prnt):
          # generated method, don't edit
          wx.Dialog.__init__(self, id=wx.ID_ANY,
              name='DialogChemicalTable', parent=prnt,
              #pos=wx.Point(780, 336),
              #size=wx.Size(598, 411),
              style=wx.RESIZE_BORDER | wx.DEFAULT_DIALOG_STYLE,
              title='Edit Chemical Table')
          # panels
          panelMain = wx.Panel(self, wx.ID_ANY)
          panelTable = wx.Panel(panelMain, wx.ID_ANY)
          panelBottom = wx.Panel(panelMain, wx.ID_ANY)
          panelBottom.SetBackgroundColour('gray')
          grid = wx.grid.Grid(panelTable, -1)
          table = ChemicalGridTable()
          grid.SetTable(table, True)
          boxSizerTable = wx.BoxSizer(wx.VERTICAL)
          boxSizerTable.Add(grid)
          panelTable.SetSizer(boxSizerTable)
it was suggested i make the following changes, but this produces a
dialog that is not resizable (although the grid is large enough to not
need scrollbars):

Please make a runnable, small as possible, sample application that
demonstrates the problem, let us know the platform and wx version, and
attach it to your mail.MakingSampleApps - wxPyWiki

--
Robin Dunn
Software Craftsmanhttp://wxPython.org

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

Yeap, got it.

not quit a small sample;-) , and it is missing images and some code is badly wrapped (at least on my system).

I had a pygridtablesample laying around from another problem I had and used it to play around with it.

As long as the grid is either directly on the frame or on a panel it all works nicely, i.e. I see scroll bars when I resize the window.

As soon as I add a panel into the game the scroll bars don't show.

I thought maybe it needed "ProcessTableMessage" stuff, sample shown here:

http://wiki.wxpython.org/UpdatingGridData

but this made no difference.

Hopefully someone else can help out on this.

Werner

pygridtablesample.py (2.22 KB)

···

On 07/09/2011 06:33 PM, Bob K. wrote:

now???

Attached is a new sample, was intrigued why it didn't work. Needed to update the sizer.Add for the grid.

Hope this helps
Werner

pygridtablesample.py (2.57 KB)

···

On 07/10/2011 12:27 PM, werner wrote:

On 07/09/2011 06:33 PM, Bob K. wrote:

now???

Yeap, got it.

not quit a small sample;-) , and it is missing images and some code is badly wrapped (at least on my system).

I had a pygridtablesample laying around from another problem I had and used it to play around with it.

As long as the grid is either directly on the frame or on a panel it all works nicely, i.e. I see scroll bars when I resize the window.

As soon as I add a panel into the game the scroll bars don't show.

I thought maybe it needed "ProcessTableMessage" stuff, sample shown here:

UpdatingGridData - wxPyWiki

but this made no difference.

Hopefully someone else can help out on this.

my apologies about the size. i just wasn't sure what was causing the
problem.

bob k.

···

On Jul 10, 6:27 am, werner <wbru...@free.fr> wrote:

On 07/09/2011 06:33 PM, Bob K. wrote:> now???

Yeap, got it.

not quit a small sample;-) , and it is missing images and some code is
badly wrapped (at least on my system).

I had a pygridtablesample laying around from another problem I had and
used it to play around with it.

As long as the grid is either directly on the frame or on a panel it all
works nicely, i.e. I see scroll bars when I resize the window.

As soon as I add a panel into the game the scroll bars don't show.

I thought maybe it needed "ProcessTableMessage" stuff, sample shown here:

UpdatingGridData - wxPyWiki

but this made no difference.

Hopefully someone else can help out on this.

Werner

pygridtablesample.py
2KViewDownload

hi werner,

in your example file, dlg is commented out and frame is used. are you
saying that i can't/shouldn't use a dialog for this?

also, i'm not sure what you mean by 'some code is badly wrapped'. i
would appreciate knowing what that means, which code has the problem,
and how i can fix it.

thank you,
bob k.

···

On Jul 10, 8:22 am, werner <wbru...@free.fr> wrote:

On 07/10/2011 12:27 PM, werner wrote:

> On 07/09/2011 06:33 PM, Bob K. wrote:
>> now???
> Yeap, got it.

> not quit a small sample;-) , and it is missing images and some code is
> badly wrapped (at least on my system).

> I had a pygridtablesample laying around from another problem I had and
> used it to play around with it.

> As long as the grid is either directly on the frame or on a panel it
> all works nicely, i.e. I see scroll bars when I resize the window.

> As soon as I add a panel into the game the scroll bars don't show.

> I thought maybe it needed "ProcessTableMessage" stuff, sample shown here:

>UpdatingGridData - wxPyWiki

> but this made no difference.

> Hopefully someone else can help out on this.

Attached is a new sample, was intrigued why it didn't work. Needed to
update the sizer.Add for the grid.

Hope this helps
Werner

pygridtablesample.py
2KViewDownload

Hi Bob,

I find top posting very difficult to follow, do you particularity like it or is it just your default setting in your email client? If yes, could you change it as I think that most people on this list prefer bottom posting (i.e. post the answer just below the question).

hi werner,

in your example file, dlg is commented out and frame is used. are you
saying that i can't/shouldn't use a dialog for this?

I kept the different code in there as I tried to narrow down what was causing the difference/problem.

You should be able to use a grid on a frame, a dialog or any other container type widget including a panel. At the moment the panel seems to cause a problem if it is not correctly added to the sizer. In the last sample on about line 77 "sb.Add(grid_, proportion=1, flag=wx.EXPAND)" I needed to add the proportion and flag to make it work.

I tried to look what is needed in your code but I got side tracked by watching the F1 race:-) . Will have another go at it.

also, i'm not sure what you mean by 'some code is badly wrapped'. i
would appreciate knowing what that means, which code has the problem,
and how i can fix it.

Lines like

         # navigation buttons
         buttonUpFirst = wx.BitmapButton(bitmap =
                             wx.Bitmap('images/UpFirst.png', wx.BITMAP_TYPE_PNG),
                             parent = panelBottom, id = wx.ID_ANY,
                             name = "upFirst")

were wrapped causing syntax errors. On second thought this is maybe an issue with me trying this stuff out on Ubuntu (i.e. Linux) and you being on windows.

That was less of a problem in my view then not creating a self contained as small as possible example. I know this can be a pain to do but it increases the chances that you find the problem yourself and it makes it a lot easier for other people to look at your problem.

I am having another look at your code and will let you know if I find what is needed.

Werner

···

On 07/10/2011 04:49 PM, BobK wrote:

Hi Bob,

On Win 7 with Python 2.6.5 and wxPython 2.8.12.0 adding this to DialogChemicalTable after the line which does grid.SetTable

         # sizer for grid
         bsPanelTable = wx.BoxSizer(wx.HORIZONTAL)
         bsPanelTable.Add(grid, proportion=1, flag=wx.EXPAND)
         panelTable.SetSizer(bsPanelTable)

It works for me but on Ubuntu 10.10 with Python 2.6.6 and wxPython 2.8.12.0 I have a layout which is pretty messed up. Will look into this again when I hear what I need to do to get the WIT working on Ubuntu.

Werner

hi werner

i'm put my posts at the bottom from now on.

i have stripped the file down many times, but when i try to add a
sizer at the bottom (to contain, navigation buttons, save, cancel,
etc.) is where things stop working. i am trying to have the grid take
up most of the frame, with a section of the bottom devoted to
navigation buttons etc. is it even possible to do what i'm asking?

bob k.

···

On Jul 10, 12:46 pm, werner <wbru...@free.fr> wrote:

Hi Bob,

I find top posting very difficult to follow, do you particularity like
it or is it just your default setting in your email client? If yes,
could you change it as I think that most people on this list prefer
bottom posting (i.e. post the answer just below the question).

On 07/10/2011 04:49 PM, BobK wrote:> hi werner,

> in your example file, dlg is commented out and frame is used. are you
> saying that i can't/shouldn't use a dialog for this?

I kept the different code in there as I tried to narrow down what was
causing the difference/problem.

You should be able to use a grid on a frame, a dialog or any other
container type widget including a panel. At the moment the panel seems
to cause a problem if it is not correctly added to the sizer. In the
last sample on about line 77 "sb.Add(grid_, proportion=1,
flag=wx.EXPAND)" I needed to add the proportion and flag to make it work.

I tried to look what is needed in your code but I got side tracked by
watching the F1 race:-) . Will have another go at it.> also, i'm not sure what you mean by 'some code is badly wrapped'. i
> would appreciate knowing what that means, which code has the problem,
> and how i can fix it.

Lines like

     \# navigation buttons
     buttonUpFirst = wx\.BitmapButton\(bitmap =
                         wx\.Bitmap\(&#39;images/UpFirst\.png&#39;,

wx.BITMAP_TYPE_PNG),
parent = panelBottom, id = wx.ID_ANY,
name = "upFirst")

were wrapped causing syntax errors. On second thought this is maybe an
issue with me trying this stuff out on Ubuntu (i.e. Linux) and you being
on windows.

That was less of a problem in my view then not creating a self contained
as small as possible example. I know this can be a pain to do but it
increases the chances that you find the problem yourself and it makes it
a lot easier for other people to look at your problem.

I am having another look at your code and will let you know if I find
what is needed.

Werner

Yes, I think so.

You also need to put the grid in a sizer and do a SetSizer on the containing panel with the sizer you create for the grid.

At least this works for me on Win7 using your code. Can't make it work yet on Ubuntu. One problem might be the use of the BoxSizer, maybe it should be a FlexGridSizer instead.

Werner

···

On 07/10/2011 07:31 PM, BobK wrote:

On Jul 10, 12:46 pm, werner<wbru...@free.fr> wrote:

Hi Bob,

I find top posting very difficult to follow, do you particularity like
it or is it just your default setting in your email client? If yes,
could you change it as I think that most people on this list prefer
bottom posting (i.e. post the answer just below the question).

On 07/10/2011 04:49 PM, BobK wrote:> hi werner,

in your example file, dlg is commented out and frame is used. are you
saying that i can't/shouldn't use a dialog for this?

I kept the different code in there as I tried to narrow down what was
causing the difference/problem.

You should be able to use a grid on a frame, a dialog or any other
container type widget including a panel. At the moment the panel seems
to cause a problem if it is not correctly added to the sizer. In the
last sample on about line 77 "sb.Add(grid_, proportion=1,
flag=wx.EXPAND)" I needed to add the proportion and flag to make it work.

I tried to look what is needed in your code but I got side tracked by
watching the F1 race:-) . Will have another go at it.> also, i'm not sure what you mean by 'some code is badly wrapped'. i

would appreciate knowing what that means, which code has the problem,
and how i can fix it.

Lines like

          # navigation buttons
          buttonUpFirst = wx.BitmapButton(bitmap =
                              wx.Bitmap('images/UpFirst.png',
wx.BITMAP_TYPE_PNG),
                              parent = panelBottom, id = wx.ID_ANY,
                              name = "upFirst")

were wrapped causing syntax errors. On second thought this is maybe an
issue with me trying this stuff out on Ubuntu (i.e. Linux) and you being
on windows.

That was less of a problem in my view then not creating a self contained
as small as possible example. I know this can be a pain to do but it
increases the chances that you find the problem yourself and it makes it
a lot easier for other people to look at your problem.

I am having another look at your code and will let you know if I find
what is needed.

Werner

hi werner

i'm put my posts at the bottom from now on.

i have stripped the file down many times, but when i try to add a
sizer at the bottom (to contain, navigation buttons, save, cancel,
etc.) is where things stop working. i am trying to have the grid take
up most of the frame, with a section of the bottom devoted to
navigation buttons etc. is it even possible to do what i'm asking?

Hi Bob,

...

i have stripped the file down many times, but when i try to add a
sizer at the bottom (to contain, navigation buttons, save, cancel,
etc.) is where things stop working. i am trying to have the grid take
up most of the frame, with a section of the bottom devoted to
navigation buttons etc. is it even possible to do what i'm asking?

Attached is I think close to what you want.

Some remarks:
- grid resizing code is in there which you might need if you change the content of the grid in place. The code is based on code found on the wiki. UpdatingGridData - wxPyWiki
- when down sizing the bottom panel disappears, obviously not very nice
- the grid's scrollbars showed up on Ubuntu when I changed the call SetSizerAndFit to just SetSizer and then I added a self.Fit() further down.
- the WIT stuff is still in there, but can still not make it work when the dialog is up and even on the main frame it only works when I add it to the help menu

Werner

rakPhoto.py (3.98 KB)

DialogChemicalTable.py (7.08 KB)

···

On 07/10/2011 07:31 PM, BobK wrote:

thank you werner! I'm looking over the changes carefully.

it seems some of this works on ubuntu and some on windows. are any of these issues considered bugs?

what is WIT?

bob k.

···

-----Original Message----- From: werner
Sent: Monday, July 11, 2011 5:12 AM
To: wxpython-users@googlegroups.com
Subject: Re: [wxPython-users] Re: grid scrollbars in dialog insanity

Hi Bob,

On 07/10/2011 07:31 PM, BobK wrote:
...

i have stripped the file down many times, but when i try to add a
sizer at the bottom (to contain, navigation buttons, save, cancel,
etc.) is where things stop working. i am trying to have the grid take
up most of the frame, with a section of the bottom devoted to
navigation buttons etc. is it even possible to do what i'm asking?

Attached is I think close to what you want.

Some remarks:
- grid resizing code is in there which you might need if you change the
content of the grid in place. The code is based on code found on the
wiki. UpdatingGridData - wxPyWiki
- when down sizing the bottom panel disappears, obviously not very nice
- the grid's scrollbars showed up on Ubuntu when I changed the call
SetSizerAndFit to just SetSizer and then I added a self.Fit() further down.
- the WIT stuff is still in there, but can still not make it work when
the dialog is up and even on the main frame it only works when I add it
to the help menu

Werner

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

Hi Bob,

Where is the bottom:-) .

thank you werner! I'm looking over the changes carefully.

You are welcome.

it seems some of this works on ubuntu and some on windows. are any of these issues considered bugs?

The latest version acts the same for me on Ubuntu and Windows, with the exception of WIT.

The outstanding sizing issue, i.e. the buttons disappear when there is not enough space in the frame is something you have to figure out how you want to deal with it.

Possible solutions I could see are:
- use a wx.lib.scrolledpanel instead of a panel to contain the grid and the buttonpanel
- readjust the size of minimal grid size
- fix a minimum size for the dialog
- others .....

what is WIT?

Widget Inspection Tool (http://wiki.wxpython.org/Widget%20Inspection%20Tool) I use this very to figure out where I messed up my sizers etc etc.

There is only one outstanding issue with that which is that I could use it on Ubuntu to debug the dialog - pretty sure that Robin will have an answer for this.

Werner

···

On 07/11/2011 06:21 PM, Bob K. wrote:

bob k.

-----Original Message----- From: werner
Sent: Monday, July 11, 2011 5:12 AM
To: wxpython-users@googlegroups.com
Subject: Re: [wxPython-users] Re: grid scrollbars in dialog insanity

Hi Bob,

On 07/10/2011 07:31 PM, BobK wrote:
...

i have stripped the file down many times, but when i try to add a
sizer at the bottom (to contain, navigation buttons, save, cancel,
etc.) is where things stop working. i am trying to have the grid take
up most of the frame, with a section of the bottom devoted to
navigation buttons etc. is it even possible to do what i'm asking?

Attached is I think close to what you want.

Some remarks:
- grid resizing code is in there which you might need if you change the
content of the grid in place. The code is based on code found on the
wiki. UpdatingGridData - wxPyWiki
- when down sizing the bottom panel disappears, obviously not very nice
- the grid's scrollbars showed up on Ubuntu when I changed the call
SetSizerAndFit to just SetSizer and then I added a self.Fit() further down.
- the WIT stuff is still in there, but can still not make it work when
the dialog is up and even on the main frame it only works when I add it
to the help menu

Werner

bottoms up! :slight_smile:

once again, thank you.
bob k.

···

On Jul 11, 1:21 pm, werner <wbru...@free.fr> wrote:

Hi Bob,

Where is the bottom:-) .

On 07/11/2011 06:21 PM, Bob K. wrote:> thank you werner! I'm looking over the changes carefully.
You are welcome.

> it seems some of this works on ubuntu and some on windows. are any of
> these issues considered bugs?

The latest version acts the same for me on Ubuntu and Windows, with the
exception of WIT.

The outstanding sizing issue, i.e. the buttons disappear when there is
not enough space in the frame is something you have to figure out how
you want to deal with it.

Possible solutions I could see are:
- use a wx.lib.scrolledpanel instead of a panel to contain the grid and
the buttonpanel
- readjust the size of minimal grid size
- fix a minimum size for the dialog
- others .....

> what is WIT?

Widget Inspection Tool
(http://wiki.wxpython.org/Widget%20Inspection%20Tool) I use this very to
figure out where I messed up my sizers etc etc.

There is only one outstanding issue with that which is that I could use
it on Ubuntu to debug the dialog - pretty sure that Robin will have an
answer for this.

Werner

> bob k.

> -----Original Message----- From: werner
> Sent: Monday, July 11, 2011 5:12 AM
> To: wxpython-users@googlegroups.com
> Subject: Re: [wxPython-users] Re: grid scrollbars in dialog insanity

> Hi Bob,

> On 07/10/2011 07:31 PM, BobK wrote:
> ...
>> i have stripped the file down many times, but when i try to add a
>> sizer at the bottom (to contain, navigation buttons, save, cancel,
>> etc.) is where things stop working. i am trying to have the grid take
>> up most of the frame, with a section of the bottom devoted to
>> navigation buttons etc. is it even possible to do what i'm asking?

> Attached is I think close to what you want.

> Some remarks:
> - grid resizing code is in there which you might need if you change the
> content of the grid in place. The code is based on code found on the
> wiki.UpdatingGridData - wxPyWiki
> - when down sizing the bottom panel disappears, obviously not very nice
> - the grid's scrollbars showed up on Ubuntu when I changed the call
> SetSizerAndFit to just SetSizer and then I added a self.Fit() further
> down.
> - the WIT stuff is still in there, but can still not make it work when
> the dialog is up and even on the main frame it only works when I add it
> to the help menu

> Werner

http://wiki.wxpython.org/Widget_Inspection_Tool

···

On 7/11/11 9:21 AM, Bob K. wrote:

thank you werner! I'm looking over the changes carefully.

it seems some of this works on ubuntu and some on windows. are any of
these issues considered bugs?

what is WIT?

--
Robin Dunn
Software Craftsman

thank you robin.

···

On Jul 11, 1:42 pm, Robin Dunn <ro...@alldunn.com> wrote:

On 7/11/11 9:21 AM, Bob K. wrote:

> thank you werner! I'm looking over the changes carefully.

> it seems some of this works on ubuntu and some on windows. are any of
> these issues considered bugs?

> what is WIT?

http://wiki.wxpython.org/Widget_Inspection_Tool

--
Robin Dunn
Software Craftsmanhttp://wxPython.org