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 09-Nov-2004, 12:50
Marius Giurgi Marius Giurgi is offline
Awaiting Email Confirmation
 
Join Date: Nov 2004
Posts: 12
Marius Giurgi is on a distinguished road

Q: selecting a deactivated TAB? (+more on tabs)


Hello, my dear FLTK gurus!
I'd like to ask a few questions regarding TABs.

I've been trying to figure out why is it that the deactivated TABs can still be selected. Is this supposed to be so??? All the other widgets (unlike the TABs) seem not to be selectable nor clickable once they are deactivated. It's true that the widgets within the tab are not selectable as long as the tab itself is deactivated, but shouldn't the tab itself and its content NOT be selectable either? I'm sure there's a way to correct for this, perhaps using event handling or something like that, but I have no idea of how to implement it.

It's rather an esthetic reason to have this option available. For instance I'd like to have a few tabs with some of them deactivated based on the user's selection, say, based on preferences settings, loading a file etc. The deactivated tabs should activate (become visible, selectable, clickable) only when they become useful for the user. There's no need to show their content as long as they cannot be used anyway. Can someone give me a hint of how I can avoid them to display when they are deactivated?

Q2:
How about getting rid of that dotted focus rectangle on the tab card? (this goes the same for buttons and all other widgets that can have focus). For tabs I find this rectangle quite annoying. The tab card color itself can tell well enough which tab is currently selected, so I don't need to see that focus rectangle.

Q3:
(this is more of a remark). I tried to use the style Plastic Up Box for the tabs, and I noticed that the Fluid displays the GUI a bit different than the actual compiled version of that GUI application, which is a bit confusing given that Fluid is supposed to be a WYSIWYG application (right?). What I noticed is that in Fluid the tab cards are displayed (with the Plastic Up Box style) as nice round buttons slightly over the tab content area. Once I compile the GUI, the tab cards are being trimmed at the bottom by the tab content area. I'd like to see at least a consistency between the two. Personally I prefer the Fluid version, where the tab cards are full buttons slightly overlappe with the tab area... Anybody has any idea why this inconsistency?

ok.. hope someone has some ideas, hints for me...
And btw, is there any hands-on (cookbook) fltk book, tutorial, manual somewhere? (kind of .. "the missing fltk manual") ?

marius
  #2  
Old 09-Nov-2004, 15:23
cable_guy_67's Avatar
cable_guy_67 cable_guy_67 is offline
Senior Member
 
Join Date: Oct 2004
Location: Nescopeck, PA
Posts: 1,109
cable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the roughcable_guy_67 is a jewel in the rough
Quote:
Originally Posted by Marius Giurgi
Hello, my dear FLTK gurus!
I'd like to ask a few questions regarding TABs.

Q2:
How about getting rid of that dotted focus rectangle on the tab card? (this goes the same for buttons and all other widgets that can have focus). For tabs I find this rectangle quite annoying. The tab card color itself can tell well enough which tab is currently selected, so I don't need to see that focus rectangle.

Hello and welcome Marius. I'm glad you found us and I hope you find some useful help here. As far as the focus tab goes, I think there is a post here somewhere that talks about that. I had toyed with it when writing up the fluid tutorial but didn't have success (using focus(0) or something of that nature). It was resetting the focus back to the top and not cycling to the bottom widgets. Such is the joy of a new bag of tools. The part I don't like is the bit that was left (by the rounded up buttons) in the window (redraw the window). I will put them on the list for the next installment.

Quote:
Originally Posted by Marius Giurgi
ok.. hope someone has some ideas, hints for me...
And btw, is there any hands-on (cookbook) fltk book, tutorial, manual somewhere? (kind of .. "the missing fltk manual") ?

marius

Hehe. I have heard this same statement over and over in the newsgroups. Seems like everyone has the same problem with the documentation. It is a great help to define all the possible widgets but not so much on stringing them all together. I found the video tutorials to be a great way to see some of the possibilities but the advanced concepts is not out yet. (Back to google I guess ) Best bets, fltk.org and .net. Both have links to excellent info.

Mark
__________________
"Opportunity is missed by most people because it comes dressed in overalls and looks like work."
--Thomas Alva Edison
"Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety."
--Benjamin Franklin
"A happy person is not a person in a certain set of circumstances, but rather a person with a certain set of attitudes."
--Hugh Downs
  #3  
Old 10-Nov-2004, 19:22
WW. WW. is offline
New Member
 
Join Date: Sep 2004
Posts: 3
WW. is on a distinguished road
Marius,

Regarding Q2: I asked a similar question in this thread:

www.gidforums.com

The function call that will turn off the "focus box" is there.

WW
  #4  
Old 11-Nov-2004, 13:54
Marius Giurgi Marius Giurgi is offline
Awaiting Email Confirmation
 
Join Date: Nov 2004
Posts: 12
Marius Giurgi is on a distinguished road
Thank you folks.
the Fl::visible_focus(0) works like a charm. That's my neat tabs!

However, the main concern was actually the one specified in the title.. how to avoid deactivated tabs from being clickable? I assume that one should be at least able to do it by setting a "last selected tab" global variable, then in the tab callback one should check if the current selected tab is deactivated, if yes, hide it and make the "last selected tab" visible again (assuming that one cannot avoid the clicked tab to become visible)
(as i said, it would make more sense if the deactivated tabs would not be clickable at all by default)

What's the method to probe if the current widget is visible or not? (I haven't done a thorough fltk documentation reading yet, so this may seem like a rather naive question).

marius
  #5  
Old 23-Nov-2004, 12:03
MatthiasWM MatthiasWM is offline
VIP
 
Join Date: Nov 2004
Posts: 73
MatthiasWM will become famous soon enough
Quote:
Originally Posted by Marius Giurgi
I've been trying to figure out why is it that the deactivated TABs can still be selected. Is this supposed to be so???

Yes, this is on purpose. It's like peeking into the forbidden tab to see what I could change if only some other parameter was correct ;-) . You can override this though by deriving your own Tab class and slightly changing the 'handle()' method.

Quote:
How about getting rid of that dotted focus rectangle on the tab card?

The solution was already posted. I just want to add that the dotted box serves a purpose in allowing keyboard navigation. You could use the left and right arrow to select the tab you desire and activate it by pressing tab or enter.

Quote:
I tried to use the style Plastic Up Box for the tabs, and I noticed that the Fluid displays the GUI a bit different than the actual compiled version of that GUI application

This is probably a drawing order issue. We should fix that in Fluid.

Matthias
Last edited by dsmith : 23-Nov-2004 at 14:21. Reason: Use [/Quote] instead of [\Quote] :)
 
 

Recent GIDBlogProblems with the Navy (Officers) by crystalattice

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
MFC CListCtrl, problem selecting item kte MS Visual C++ / MFC Forum 5 01-Feb-2005 11:15
Selecting from 2 tables at the same time soviet MySQL / PHP Forum 2 07-Nov-2003 23:15
Need a script for selecting random tabels and from those tabels selecting random ques mlt MySQL / PHP Forum 2 12-Sep-2003 09:01

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

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


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