XRC an ListCtrlStyle

Hi,

Is it my mistake or is it not possible to assign the wxLC_HRULES|wcLC_VRULES styles via XRC file to a ListCtrl?

XRC-definition:

<object class="wxListCtrl" name="CUST_LIST_CTRL">
     <size>100,100</size>
     <style>wxLC_REPORT|wxLC_HRULES|wxLC_VRULES</style>
</object>

This throws following error:
Unknown style flag: wxLC_HRULES
Unknown style flag: wxLC_VRULES
on a Messagewindow while runnig the program.

What's going wrong? How can I do this assignment otherwise but with using XRC?

Andreas

Andreas Kaiser wrote:

Hi,

Is it my mistake or is it not possible to assign the wxLC_HRULES|wcLC_VRULES styles via XRC file to a ListCtrl?

XRC-definition:

<object class="wxListCtrl" name="CUST_LIST_CTRL">
    <size>100,100</size>
    <style>wxLC_REPORT|wxLC_HRULES|wxLC_VRULES</style>
</object>

This throws following error:
Unknown style flag: wxLC_HRULES
Unknown style flag: wxLC_VRULES
on a Messagewindow while runnig the program.

What's going wrong? How can I do this assignment otherwise but with using XRC?

Those styles have already been added to the listctrl xrc handler in 2.5. In 2.4 you can probably add them by calling the listctrl's SetSingleStyle method.

···

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

SetSingleStyle method.

Thanks Robin, now it works well.

Andreas