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

Close button for tabs

Started by rickg22, August 01, 2005, 07:28:32 AM

Previous topic - Next topic

DreadNot

As far as the toolbar is concerned, add the following buttons after Save:
1] Save All
2] Close (current tab/file)
3] Close All

Did anyone notice that Mozilla also has a "New Tab" button on the left side as well as a "Close Tab" on the right.

The notebook code calls "wx/generic/tabg.h", so what I believe needs to be changed is "tabg.h" and "tabg.cpp" in wx to have a controlled left and right margin something like it has for the top margin.  I think these files are generic to all wx versions.  The left/right margin should act something like (and in addition to) the m_tabHorizontalOffset value.  These margins would allow the addition of the button(s) to the left and right sides of the notebook in the tabs area.

AkiraDev

QuoteInsert Quote
As far as the toolbar is concerned, add the following buttons after Save:
1] Save All
2] Close (current tab/file)
3] Close All

I would agree on just adding the Save All button, as during workflow, it is the option I use the most.

QuoteDid anyone notice that Mozilla also has a "New Tab" button on the left side as well as a "Close Tab" on the right.

Do you mean adding a "new empty text file" button?

Quote
The notebook code calls "wx/generic/tabg.h", so what I believe needs to be changed is "tabg.h" and "tabg.cpp" in wx to have a controlled left and right margin something like it has for the top margin.  I think these files are generic to all wx versions.  The left/right margin should act something like (and in addition to) the m_tabHorizontalOffset value.  These margins would allow the addition of the button(s) to the left and right sides of the notebook in the tabs area.

Very useful info, will look into that.

Regards

AkiraDev

Hi to all.

Someone recently added a tabbed control which mimics the Microsoft Visual Studio .NET source code editor layout to the wxForum Code Dump.
Those interested can take a peek here: http://www.solidsteel.nl/users/wxwidgets/viewtopic.php?t=3781&sid=b3f75113346331c93f921302889bb031

Regards

rickg22

Alright, so that means we should merge the wxTabbedCtrl with (um... forgot your name sorry :oops: ) 's modified notebook code.

kimastergeorge

No, all you really need is their version. It doesn't have any sort of customizable button, but it works the same as mine, and seems to be much prettier (and cleaner).

AkiraDev

Personally, I would like to have an option of having the tabs in either FF-style or VS.NET-style.

rickg22

Quote from: kimastergeorge on August 28, 2005, 10:14:56 PM
No, all you really need is their version. It doesn't have any sort of customizable button, but it works the same as mine, and seems to be much prettier (and cleaner).

Um...

"The only significant difference between this class and wxNotebook is that if you are adding new page you don't need any wxWindow instance for the page itself. It's because wxTabbedCtrl doesn't have any pages, only tabs."

This is what worries me. It's not a notebook, it's a tab control. I'm afraid it can't be just interchanged with our notebook...

AkiraDev

#37
Taking a look to the source, one can adapt wxTabbedCtrl so that it will also own a std::vector of pointers to wxWindow. Then, the selection events are handled by using calls to wxWindow::Show(). I don't see such a big problem with the "absence" of wxWindows.

The only problem I could actually see was that there is no wxScrollBar showing up on the right side when the bar is overflown by tabs. Nasty. But, then again, this can also be worked around.

takeshimiya

#38
Note that Firefox doesn't show a ScrollBar when the bar is overflown by tabs.
The best I think is:

[SOMETAB] [SOMETAB] [SOMETAB] [<] [>] [CLOSE]

And would be better if the ScrollBar scrolls "pages of tabs" instead of "1 tab" each time you clic on a Prev/Next of the ScrollBar.

kimastergeorge

Quote from: takeshimiya on August 29, 2005, 10:15:26 PM
Note that Firefox doesn't show a ScrollBar when the bar is overflown by tabs.
The best I think is:

[SOMETAB] [SOMETAB] [SOMETAB] [<] [>]


  • And would be better if the ScrollBar scrolls "pages of tabs" instead of "1 tab" each time you clic on a Prev/Next of the ScrollBar.
You're gonna have to take that up with the dudes at GTK+ and the Windows GUI designers.

Honestly, though, I have no idea how Firefox does what it does! It almost shouldn't happen! Nowhere in the GTK+ or Windows API (not to mention wxWidgets) is there a method for doing that.