News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

BOUNTY: Notebook class with "close" button at the right

Started by rickg22, August 02, 2005, 04:09:03 AM

Previous topic - Next topic

eranif

I forgot the answer your question: Yes, the link always contains the latest souces + sample

Eran

rickg22

eranif: You might considering posting your project officially at berlios (for SVN access) or sourceforge (for CVS access).

mandrav

@Eran: please allow the event handler to cancel an operation.

What I mean is, you send events before page changes, after it changes and before it closes. But right now, they 're just informational events, i.e. just letting us know what is going to happen.
But we should be able to say to wxFlatNotebook: "hey, do not close this page, it's not saved yet" :)

Fortunately, this is easy. Just add the following couple of lines after posting the message:

    // the event handler allows it?
    if (!event.IsAllowed())
        return;


I have already added it in my copy but it will be a pain to merge these after every update...
Be patient!
This bug will be fixed soon...

eranif

Ok, Will do

I am also attaching a snipt of the bottom style that I am currently working on (i created the style for 2 of the 3 styles):




I also removed the X<> buttons and configured them as styles as you guys requested

Eran

killerbot

Eran,

Thanks, you are doing a wonderfull job !!!!!!!!

Cheers,
Lieven

mandrav

Thanks Eran :)

I 'm almost done integrating it. I only have a problem with middle-click closing. Did you update the zip file by any chance?  :lol:
Be patient!
This bug will be fixed soon...

Ceniza

Pretty nice job. Really.

mandrav: After wxFNB_BOTTOM and your request be implemented would it be ready for the transition? (I know, I'll be patient.) :)

There's only one minor thing left: when using the style wxFNB_NO_X_BUTTON, could the space saved by not drawing the X be used? I mean, if there won't be X button but navigation arrows, those could be moved to the right, giving at the same time a few extra pixels for the tabs.

mandrav: the middle-click problem is the selected tab changes BTW?

280Z28

78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
Check out The Sam Zone :cool:

mandrav

@Eran: you have a bug in RemovePage().
In the event you 're posting you have:
event.SetSelection(m_pages->m_iActivePage);

when it should be:
event.SetSelection(page);

Because of this, I was deleting the wrong page. No wonder why it went crazy on me ;)
Be patient!
This bug will be fixed soon...

eranif

OK,

I am done with the bottom style here is the last piece missing (the default style, ironcially the hardest one to move to bottom ...)

Here is how it looks:


For the middle button: Is is the same problem reported earlier by Ceniza (the selection is changed before closing the tab)?

If it is the same problem - I will have a look at it

Eran



rickg22

Eran: A couple of questions from a non-(yet)-user:

Is the option for < and > (but not X ) implemented? Just curious.
Finally, under what license are you releasing your code? Using the wxWindows license would be good, that way we could incorporate your class on private (non-opensourced) projects.

eranif

Hi,

The options for the 'x' '<' '>' are implemented (the sources are updated at the usuall place and the demo is updated as well)
The licnese is wxWidgets (you can use it for any purpose you like, as long as you follow the wxWidgets license)

The full sources + demo can be downloaded from:
http://www.eistware.com/wx/wxFlatNotebook.zip

Regards,
Eran

rickg22

Cool, thanks! :)

BTW, have you considered submitting your code to wxWidgets so it'll become an official widget?

eranif

Julian already put a link to my work at the wxWidgets site (check the contributions part -> classes )

Eran

tiwag

when i shrink the demo horizontally so that only one tab is visible, the advance selection arrows aren't working



[edit]
another issue, if the horizontal size is very small, no tab is shown  :shock:
i would expect some kind of truncated tab instead of none.