Author Topic: Close button for tabs  (Read 33812 times)

DreadNot

  • Guest
Re: Close button for tabs
« Reply #30 on: August 09, 2005, 02:07:11 pm »
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.

Offline AkiraDev

  • Multiple posting newcomer
  • *
  • Posts: 71
Re: Close button for tabs
« Reply #31 on: August 09, 2005, 05:48:44 pm »
Quote
Insert 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.

Quote
Did 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

Offline AkiraDev

  • Multiple posting newcomer
  • *
  • Posts: 71
Re: Close button for tabs
« Reply #32 on: August 26, 2005, 10:28:05 am »
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

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Close button for tabs
« Reply #33 on: August 26, 2005, 05:55:18 pm »
Alright, so that means we should merge the wxTabbedCtrl with (um... forgot your name sorry :oops: ) 's modified notebook code.

kimastergeorge

  • Guest
Re: Close button for tabs
« Reply #34 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).

Offline AkiraDev

  • Multiple posting newcomer
  • *
  • Posts: 71
Re: Close button for tabs
« Reply #35 on: August 29, 2005, 02:18:06 am »
Personally, I would like to have an option of having the tabs in either FF-style or VS.NET-style.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Close button for tabs
« Reply #36 on: August 29, 2005, 05:34:22 am »
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...

Offline AkiraDev

  • Multiple posting newcomer
  • *
  • Posts: 71
Re: Close button for tabs
« Reply #37 on: August 29, 2005, 10:16:29 am »
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.
« Last Edit: August 29, 2005, 10:18:09 am by AkiraDev »

takeshimiya

  • Guest
Re: Close button for tabs
« Reply #38 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] [<] [>] [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.
« Last Edit: August 30, 2005, 01:57:41 am by takeshimiya »

kimastergeorge

  • Guest
Re: Close button for tabs
« Reply #39 on: August 30, 2005, 12:24:13 am »
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.