GIDForums  

Go Back   GIDForums > Computer Programming Forums > FLTK Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 25-Sep-2004, 21:52
WW. WW. is offline
New Member
 
Join Date: Sep 2004
Posts: 3
WW. is on a distinguished road

A couple questions about Fl_Tabs


I'm a recent FLTK user trying to figure out some details.
I have two questions about Fl_Tabs.

(1) (This probably applies to other widgets.) When my window initially comes up, the first tab is on top (naturally), and none of the tab labels have that thin box around them. Clicking on a tab label brings that tab to the front, but it also draws a thin black box around the tab label. Can I get rid of the thin black box? I don't think it looks very good.

(2) Is there a way to "beef up" the upper edge of the tabs, so that the selected tab more clearly appears to be on top? Currently there is only a thin white line.

Suggestions, and pointers to docs, would be greatly appreciated.
  #2  
Old 01-Oct-2004, 08:37
dsmith's Avatar
dsmith dsmith is offline
Senior Member
 
Join Date: Jan 2004
Location: Utah, USA
Posts: 1,351
dsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of light
Quote:
Originally Posted by WW.
I'm a recent FLTK user trying to figure out some details.
I have two questions about Fl_Tabs.

(1) (This probably applies to other widgets.) When my window initially comes up, the first tab is on top (naturally), and none of the tab labels have that thin box around them. Clicking on a tab label brings that tab to the front, but it also draws a thin black box around the tab label. Can I get rid of the thin black box? I don't think it looks very good.

(2) Is there a way to "beef up" the upper edge of the tabs, so that the selected tab more clearly appears to be on top? Currently there is only a thin white line.

Suggestions, and pointers to docs, would be greatly appreciated.

Hi WW. Welcome to GIDForums.

Unfortunately, I don't have an immediate answer to your question. I ussually don't post unless I have something constructive to say, but I do know excactly what you are talking about. I am going to do some research on this and see if I can find out anything. I would also encourage you to post if you find out any pertinent information.

The FLTK forum is quite new here and we are hoping to attract some more traffic as time goes by. I hope that you stick around and continue to ask/answer questions here as you see fit.

Hopefully, I can get some better info for you on your question over the weekend.

Thanks!
  #3  
Old 06-Oct-2004, 18:32
WW. WW. is offline
New Member
 
Join Date: Sep 2004
Posts: 3
WW. is on a distinguished road
Thanks for the welcome, dsmith. Sure is quiet around here :-) The FLTK newsgroup seems pretty active, but I do like forums better than newsgroups.

I posted the same question on the newsgroup. Micheal Sweet suggested using Fl::visible_focus(0) to get rid of the thin black focus box, and that worked.

I had to do some experimenting to get tabs that I liked a little better than the default. One easy change was to set the box type of the Fl_Tabs widget to FL_EMBOSSED_BOX. This makes the edge of the tab a bit more substantial.

To really emphasize the selected tab, I added a callback to the Fl_Tabs widget that changes the font of the selected tab's label to bold, and increases its size by two. Here is the callback:

CPP / C++ / C Code:
void cb_tabs_group(Fl_Widget* w, void* data)
    {
    Fl_Tabs* t = (Fl_Tabs*) w;
    int n = t->children();

    Fl_Group* g = (Fl_Group*) (t->value());
    g->labelsize(16);
    g->labelfont(FL_HELVETICA_BOLD);

    Fl_Group** kids = (Fl_Group**) (t->array());
    for (int i = 0; i < n; ++i)
        {
        if (kids[i] != g)
            {
            kids[i]->labelsize(14);
            kids[i]->labelfont(FL_HELVETICA);
            }
        }
    }

I also had to change the labelsize and labelfont of the first tab created to 16 and FL_HELVETICA_BOLD, respectively, since the first one created is the one on top initially.

I've uploaded a sample.
Attached Images
File Type: png Screenshot-VFEDIT.png (24.0 KB, 112 views)
Last edited by dsmith : 07-Oct-2004 at 07:01. Reason: Please use [c] & [/c] for syntax highlighting
  #4  
Old 07-Oct-2004, 07:04
dsmith's Avatar
dsmith dsmith is offline
Senior Member
 
Join Date: Jan 2004
Location: Utah, USA
Posts: 1,351
dsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of light
Quote:
Originally Posted by WW.
Thanks for the welcome, dsmith. Sure is quiet around here :-) The FLTK newsgroup seems pretty active, but I do like forums better than newsgroups.

First of all thank you for posting back with a solution. You and I both like forums better than the newsgroups. Over time we should attract some more attention. A big reason for my requesting an FLTK forum is that I have a ton of questions myself...

Anyway, I hope that you will stick around and feel free to post any questions, solutions, etc. here.
 
 

Recent GIDBlogGID Spam Detector 1.1.0 by gidnetwork

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Couple of questions Memory and CD RW schuumi Computer Hardware Forum 3 15-Sep-2004 15:32
Hello from cali, questions about web design jonnydangerous New Member Introductions 3 20-Aug-2004 13:59
Multi-Lingual Webpages & A Couple General Questions. dwaunthomas Web Design Forum 5 15-May-2004 11:07
Simple questions? Netizen Dave Apache Web Server Forum 3 17-Mar-2004 04:45
[Linux] Top newbie questions. JdS Computer Software Forum - Linux 3 22-Jan-2004 12:00

Network Sites: GIDNetwork · GIDApp · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 22:02.


vBulletin, Copyright © 2000 - 2013, Jelsoft Enterprises Ltd.