User forums > Using Code::Blocks
Code::Blocks colors
mimi89999:
Sorry, but I don't quite understand what you need to do if it isn't styling. It is possible to put a label and a close button in a tab. Instead of putting a label inside the tab, a 2 element horizontal box needs to be put wit a label in the left part and a button in the right part.
I don't understand why that border width is needed.
mimi89999:
Maybe https://developer.gnome.org/gtk3/stable/GtkStyleContext.html#gtk-style-context-get-border or https://developer.gnome.org/gtk3/stable/GtkStyleContext.html#gtk-style-context-get-margin coud be used to get that width.
mimi89999:
There is also this bug on Mozilla's Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=877605
oBFusCATed:
--- Quote from: mimi89999 on April 09, 2020, 02:30:30 pm ---Sorry, but I don't quite understand what you need to do if it isn't styling. It is possible to put a label and a close button in a tab. Instead of putting a label inside the tab, a 2 element horizontal box needs to be put wit a label in the left part and a button in the right part.
--- End quote ---
GTK2 contains API which says something like gtk_draw_notebook_button(...) gtk_draw_notebook_label(...) gtk_draw_notebook_border(...). All these take the notebook style from the theme and make it possible to create custom notebook which looks like the gtk_notebook control.
I couldn't find any such APIs in gtk 3 (after 1-2 hour search on the internet).
I can draw tabs in my style, I don't need any gtk APIs to do it, I can do it with wxWidgets' API. But this would mean that the style of the notebook won't match of the gtk3 notebook in native gtk apps.
Is it clear now?
p.s. Thanks for the mozilla links. They might be useful.
mimi89999:
I'm not sure if it's what you need, but I made a tab with a close button. It's very ugly because I didn't set the size, but it shouldn't be an issue. Wrote it in Python3 to be faster.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version