error with wx.StatusBar.SetMinHeight - seems to be having zero effect.

I'm wanting to have a double height status bar instead of a single height status bar; I thought that statusBar.SetMinHeight would do the trick... but it seems to have zero effect.
I am a novice python scripter so maybe I'm doing it wrong... if so could someone correct me (the applicable code is at the bottom of the message;
If I'm doing it right could someone confirm that it is a bug and I'll post an artifact on the tracker.
Thanks;
Pacific Morrowin

code:
class BashStatusBar(wx.StatusBar):
     #--Class Data
     buttons = Links()

     def __init__(self, parent):
         wx.StatusBar.__init__(self, parent, -1)
         global statusBar
         statusBar = self
         self.SetFieldsCount(3)
         buttons = BashStatusBar.buttons
         self.buttons = []
         for link in buttons:
             gButton = link.GetBitmapButton(self,style=wx.NO_BORDER)
             if gButton: self.buttons.append(gButton)
         self.SetStatusWidths([34*len(self.buttons),-1, 120])
         self.OnSize() #--Position buttons
         self.SetMinHeight(50)
         wx.EVT_SIZE(self,self.OnSize)
         #--Bind events
         #--Clear text notice
         self.Bind(wx.EVT_TIMER, self.OnTimer)

     def OnSize(self,event=None):
         rect = self.GetFieldRect(0)
         (xPos,yPos) = (rect.x+1,rect.y+1)
         for button in self.buttons:
             button.SetPosition((xPos,yPos))
             xPos += 34
         if event: event.Skip()

     def SetText(self,text="",timeout=5):
         """Set's display text as specified. Empty string clears the field."""
         self.SetStatusText(text,1)
         if timeout > 0:
             wx.Timer(self).Start(timeout*1000,wx.TIMER_ONE_SHOT)

     def OnTimer(self,evt):
         """Clears display text as specified. Empty string clears the field."""
         self.SetStatusText("",1)

···

#------------------------------------------------------------------------------

Hi,

2010/1/11 Pacific Morrowind:

I'm wanting to have a double height status bar instead of a single height
status bar; I thought that statusBar.SetMinHeight would do the trick... but
it seems to have zero effect.
I am a novice python scripter so maybe I'm doing it wrong... if so could
someone correct me (the applicable code is at the bottom of the message;
If I'm doing it right could someone confirm that it is a bug and I'll post
an artifact on the tracker.

Not all the platforms support changing the status bar height (as far
as I remember). Which platform and wxPython version are you using?

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

Windows Vista, wxPython 2.8.10.1 - ANSI, Python 2.6.

Thanks

Pacific Morrowind

···

http://xoomer.alice.it/infinity77/http://thedoomedcity.blogspot.com/

Pacific Morrowind wrote:

Windows Vista, wxPython 2.8.10.1 - ANSI, Python 2.6.
Thanks
Pacific Morrowind

Hi,

2010/1/11 Pacific Morrowind:
  

I'm wanting to have a double height status bar instead of a single height
status bar; I thought that statusBar.SetMinHeight would do the trick... but
it seems to have zero effect.
I am a novice python scripter so maybe I'm doing it wrong... if so could
someone correct me (the applicable code is at the bottom of the message;
If I'm doing it right could someone confirm that it is a bug and I'll post
an artifact on the tracker.
    
Not all the platforms support changing the status bar height (as far
as I remember). Which platform and wxPython version are you using?

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
http://thedoomedcity.blogspot.com/
  

Totally OT -- aren't you maintaining Wrye Bash? I recall talking to you on the oblivion forums about making wrye bash work with python 2.6 and wx unicode :slight_smile:

···

On 12/01/2010 12:34 AM, Andrea Gavana wrote:

--
Steven Sproat, BSc
http://www.basicrpg.com/

Now that's funny... what a small world... Yes - and this question is actually for Wrye Bash - the status bar icons are 16*16px and some people have said that is too small to see very well (and I do somewhat agree); I've easily managed to make them any width I want but the height is being irksome.
Pacific Morrowind

···

On 12/01/2010 5:04 PM, Steven Sproat wrote:

Totally OT -- aren't you maintaining Wrye Bash? I recall talking to you on the oblivion forums about making wrye bash work with python 2.6 and wx unicode :slight_smile:

The native statusbar on Windows can not be resized. You'll need to make your own statusbar-like widget if you want it to be larger.

···

On 1/12/10 2:29 PM, Pacific Morrowind wrote:

On 12/01/2010 12:34 AM, Andrea Gavana wrote:

Hi,

2010/1/11 Pacific Morrowind:

I'm wanting to have a double height status bar instead of a single height
status bar; I thought that statusBar.SetMinHeight would do the trick... but
it seems to have zero effect.
I am a novice python scripter so maybe I'm doing it wrong... if so could
someone correct me (the applicable code is at the bottom of the message;
If I'm doing it right could someone confirm that it is a bug and I'll post
an artifact on the tracker.

Not all the platforms support changing the status bar height (as far
as I remember). Which platform and wxPython version are you using?

Windows Vista, wxPython 2.8.10.1 - ANSI, Python 2.6.

--
Robin Dunn
Software Craftsman

Okay then the wxPython site api docs should have that as a notation (specifically on this page: wxPython API Documentation — wxPython Phoenix 4.2.2 documentation).
Take me me a while longer but I guess that's what I'll have to do then; thanks for the help.
hmmm no wait... just one last question about this issue: http://support.microsoft.com/kb/151031 certainly implies that it can be done; is that just a function that python can't access? or a is it a fix that hasn't been done in wxPython?
thanks;
Pacific Morrowind

···

On 12/01/2010 10:13 PM, Robin Dunn wrote:

The native statusbar on Windows can not be resized. You'll need to make your own statusbar-like widget if you want it to be larger.

Hi,

2010/1/13 Pacific Morrowind:

Okay then the wxPython site api docs should have that as a notation
(specifically on this page:
wxPython API Documentation — wxPython Phoenix 4.2.2 documentation).
Take me me a while longer but I guess that's what I'll have to do then;
thanks for the help.
hmmm no wait... just one last question about this issue:
http://support.microsoft.com/kb/151031 certainly implies that it can be
done; is that just a function that python can't access? or a is it a fix
that hasn't been done in wxPython?

I am quite sure you can do it on Windows, at least Windows XP. I had a
small widget, called EnhancedStatusBar, once on my web page:

http://xoomer.virgilio.it/infinity77/main/freeware.html#enhancedstatusbar

You can add whatever control you wish in the status bar, plus I
remember explicitely setting the statusbar height to accomodate these
controls. It's been a while since I used it or revisited, and it has
not be integrated into wx.lib.agw as it is not really portable across
platforms.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

Okay then the wxPython site api docs should have that as a notation
(specifically on this page:
wxPython API Documentation — wxPython Phoenix 4.2.2 documentation).
Take me me a while longer but I guess that's what I'll have to do then;
thanks for the help.
hmmm no wait... just one last question about this issue:
http://support.microsoft.com/kb/151031 certainly implies that it can be
done;

Ah, I was mixed up. wxMSW does allow the statusbar height to be changed. It's wxMac that does not. (I'm not sure about wxGTK.) Just change the height and then send the frame a size event so it will adjust itself to the new size.

is that just a function that python can't access? or a is it a fix
that hasn't been done in wxPython?

wxWidgets does not wrap MFC (the CStatusBar class mentioned is an MFC class.) wx uses the Win32 API directly, just like MFC does.

···

On 1/12/10 11:33 PM, Pacific Morrowind wrote:

--
Robin Dunn
Software Craftsman

Well I'm obviously not doing it right... still haven't figured this out; I'm (reasonably) good with Python but most of the GUI coding goes over my head still.
So I'm hoping someone here can tell me what I'm doing wrong. Below is the code for the StatusBar. buttons is populated elsewhere, the text in the second and third fields are set by various user actions elsewhere and the status bar itself is attached to a frame elsewhere but other than that this is all the code relating to the StatusBar.

[code]
class BashStatusBar(wx.StatusBar):
     #--Class Data
     buttons = Links()

     def __init__(self, parent):
         wx.StatusBar.__init__(self, parent, -1)
         global statusBar
         statusBar = self
         self.SetFieldsCount(3)
         buttons = BashStatusBar.buttons
         self.buttons =
         for link in buttons:
             gButton = link.GetBitmapButton(self,style=wx.NO_BORDER)
             if gButton: self.buttons.append(gButton)
         self.SetStatusWidths([18*len(self.buttons),-1, 120])
         self.OnSize() #--Position buttons
         wx.EVT_SIZE(self,self.OnSize)
         #--Bind events
         #--Clear text notice
         self.Bind(wx.EVT_TIMER, self.OnTimer)

     def OnSize(self,event=None):
         self.SetMinHeight = 64
         rect = self.GetFieldRect(0)
         (xPos,yPos) = (rect.x+1,rect.y+1)
         for button in self.buttons:
             button.SetPosition((xPos,yPos))
             xPos += 18
         if event: event.Skip()

     def SetText(self,text="",timeout=5):
         """Set's display text as specified. Empty string clears the field."""
         self.SetStatusText(text,1)
         if timeout > 0:
             wx.Timer(self).Start(timeout*1000,wx.TIMER_ONE_SHOT)

     def OnTimer(self,evt):
         """Clears display text as specified. Empty string clears the field."""
         self.SetStatusText("",1)
[/code]
Thanks;
Pacific Morrowind

···

On 13/01/2010 11:14 AM, Robin Dunn wrote:

On 1/12/10 11:33 PM, Pacific Morrowind wrote:

Okay then the wxPython site api docs should have that as a notation
(specifically on this page:
wxPython API Documentation — wxPython Phoenix 4.2.2 documentation).
Take me me a while longer but I guess that's what I'll have to do then;
thanks for the help.
hmmm no wait... just one last question about this issue:
http://support.microsoft.com/kb/151031 certainly implies that it can be
done;

Ah, I was mixed up. wxMSW does allow the statusbar height to be changed. It's wxMac that does not. (I'm not sure about wxGTK.) Just change the height and then send the frame a size event so it will adjust itself to the new size.

Try

  self.SetSize((-1, 64))
  self.GetParent().SendSizeEvent()

I did similar with a wx.StatusBar and it worked for me.

···

On 2/4/10 10:43 AM, Pacific Morrowind wrote:

On 13/01/2010 11:14 AM, Robin Dunn wrote:

On 1/12/10 11:33 PM, Pacific Morrowind wrote:

Okay then the wxPython site api docs should have that as a notation
(specifically on this page:
wxPython API Documentation — wxPython Phoenix 4.2.2 documentation).
Take me me a while longer but I guess that's what I'll have to do then;
thanks for the help.
hmmm no wait... just one last question about this issue:
http://support.microsoft.com/kb/151031 certainly implies that it can be
done;

Ah, I was mixed up. wxMSW does allow the statusbar height to be
changed. It's wxMac that does not. (I'm not sure about wxGTK.) Just
change the height and then send the frame a size event so it will
adjust itself to the new size.

Well I'm obviously not doing it right... still haven't figured this out;
I'm (reasonably) good with Python but most of the GUI coding goes over
my head still.
So I'm hoping someone here can tell me what I'm doing wrong. Below is
the code for the StatusBar. buttons is populated elsewhere, the text in
the second and third fields are set by various user actions elsewhere
and the status bar itself is attached to a frame elsewhere but other
than that this is all the code relating to the StatusBar.

--
Robin Dunn
Software Craftsman

Worked Perfectly! Thank-you so much... was one of my two issues that I had listed as do this before next release... and the other one I know how to do (but will take a while).
Pacific Morrowind

···

On 04/02/2010 11:45 AM, Robin Dunn wrote:

Try

    self.SetSize((-1, 64))
    self.GetParent().SendSizeEvent()

I did similar with a wx.StatusBar and it worked for me.