[wx-dev] wxStaticLine Behaviour differs in wxGTK and wxMSW

Kit Bishop kit at bishop.net.nz
Sun Jul 27 17:22:21 PDT 2008


Environments:
1. openSUSE 11.0, wx2.8 up to date from SVN
2. WinXp, SP3, MinGW, wx2.8 up to date from SVN

When I create a wxStaticLine using the following code:
       m_sizer = new wxBoxSizer( wxHORIZONTAL );
       m_line = new wxStaticLine( m_panel, wxID_ANY, wxDefaultPosition, 
wxSize( -1,-1 ), wxLI_HORIZONTAL );
       m_sizer->Add( m_line, 1, wxEXPAND | wxALIGN_CENTER_VERTICAL, 5 );
I get:
1. In Linux, the line is a thin horizontal line
2. In MSW, the thickness of the line expands to the full height 
allocated by the sizer

If I remove the wxEPAND, I get a thin line (which is actually what I 
want) in both cases.

While this is not a big issue for me (since I can get the effect I want) 
I thought I'd just mention this difference.

Personnaly, I think the behaviour should be the same on both platforms 
(if possible) and think the MSW behaviour gives more flexibility.

Best regards,
Kit Bishop


More information about the wx-dev mailing list