wxFoldPanelBar - single fold feature needed
cai
public.cai at gmail.com
Wed Jan 3 15:22:41 PST 2007
Meanwhile I made it work :-)
Like this:
foldbar->Connect(wxEVT_CAPTIONBAR,
(wxObjectEventFunction)(wxCaptionBarEventFunction(SymbolSelector::onCaptionPanel)),
NULL, this);
then:
void SymbolSelector::onCaptionPanel(wxCaptionBarEvent &event)
{
wxFoldPanelItem* mru = foldbar->Item(0).GetItem();
wxFoldPanelItem* mfu = foldbar->Item(1).GetItem();
if (mru->IsExpanded())
{
foldbar->Expand(mfu);
foldbar->Collapse(mru);
}
else // MFU is expanded
{
foldbar->Expand(mru);
foldbar->Collapse(mfu);
}
}
My initial mistake was that I was deriving my panels from
wxFoldPanelItem and tried to catch the EVT_CAPTIONBAR in these custom
wxFoldPanelItem classes, which did not work.
Regards,
Cristina.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wx-users/attachments/20070104/bd380dad/attachment.htm
More information about the wx-users
mailing list