![]() |
|
#1
|
|||
|
|||
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
|
||||
|
||||
|
Quote:
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. Quote:
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 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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
Quote:
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:
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:
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 GIDBlog
Problems with the Navy (Officers) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
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