wxFoldPanelBar - single fold feature needed
Jorgen Bodde
jorgen.maillist at gmail.com
Thu Jan 4 02:09:17 PST 2007
Hi Christina,
Great that you solved it! I will try to make this more generic, also
solve some minor issues like panels falling off the screen when the
window is not big enough, and I will think about adding sizer support
to the windows. Back then I was not reappy into sizers, but now it is
really kind of a must.
I'm not sure of the time span that it might take but it has my
attention now. If you need anything else I will be glad to help.
Regards,
- Jorgen
On 1/4/07, cai <public.cai at gmail.com> wrote:
>
> 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.
More information about the wx-users
mailing list