wxGrid.SetColLabelAlignment does not work

Hi,

it took me some time to find a method to set the alignment
of grid headings, but nevertheless it does not seem to work.
I tried:

myGrid.SetColLabelAlignment(col, wxLEFT)

but the headings are always centered.

Any hints?

Rüdiger

···

--
Ruediger.Maehl@web.de
Fax/Voice: +49 (0) 180 505 255 932 390
Mobile/SMS: +49 (0) 160 427 4619
_______________________________________________________________________________
Alles unter einem Dach: Informationen, Fun, E-Mails. Bei WEB.DE: http://web.de
Die große Welt der Kommunikation: E-Mail, Fax, SMS, WAP: http://freemail.web.de

it took me some time to find a method to set the alignment
of grid headings, but nevertheless it does not seem to work.
I tried:

myGrid.SetColLabelAlignment(col, wxLEFT)

but the headings are always centered.

Any hints?

Looks like it is not for individual columns but for all. The two parameters
let you set both verical and horizontal alignment for all column labels.
SetRowLabelValue is similar. Here is the implementaion:

void wxGrid::SetColLabelAlignment( int horiz, int vert )
{
    // allow old (incorrect) defs to be used
    switch ( horiz )
    {
        case wxLEFT: horiz = wxALIGN_LEFT; break;
        case wxRIGHT: horiz = wxALIGN_RIGHT; break;
        case wxCENTRE: horiz = wxALIGN_CENTRE; break;
    }

    switch ( vert )
    {
        case wxTOP: vert = wxALIGN_TOP; break;
        case wxBOTTOM: vert = wxALIGN_BOTTOM; break;
        case wxCENTRE: vert = wxALIGN_CENTRE; break;
    }

    if ( horiz == wxALIGN_LEFT || horiz == wxALIGN_CENTRE || horiz ==
wxALIGN_RIGHT )
    {
        m_colLabelHorizAlign = horiz;
    }

    if ( vert == wxALIGN_TOP || vert == wxALIGN_CENTRE || vert ==
wxALIGN_BOTTOM )
    {
        m_colLabelVertAlign = vert;
    }

    if ( !GetBatchCount() )
    {
        m_colLabelWin->Refresh();
    }
}

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!