For Programmers: Free Programming Magazines  


Home > Archive > Tcl > October 2006 > tile combobox question









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author tile combobox question
keithv

2006-09-28, 7:02 pm

When a tile combobox is in readonly mode, it draws a dotted
box around the current value. This is true for at least xpnative
and winnative themes up through version 0.7.5.

Is there anyway of getting rid of it?

Thanks,
Keith

Gerald W. Lester

2006-09-28, 7:02 pm

keithv wrote:
> When a tile combobox is in readonly mode, it draws a dotted
> box around the current value. This is true for at least xpnative
> and winnative themes up through version 0.7.5.
>
> Is there anyway of getting rid of it?


Use a theme that does not specify that is to be done.

The idea of tile is that it displays things the theme says to display them
so they are consistent with all your other applications that listen to the
window manager's theme.

--
+--------------------------------+---------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
keithv

2006-09-28, 10:01 pm

Gerald W. Lester wrote:
> keithv wrote:
>
> Use a theme that does not specify that is to be done.
>
> The idea of tile is that it displays things the theme says to display them
> so they are consistent with all your other applications that listen to the
> window manager's theme.


But I TRYING to get my app to look like "other applications".

I'm siiting here on windows looking a the tools dialog in
Microsoft IE and examining how the combobox works. It's
looks and behaves just like tile's xpnative theme combobox
(in readonly mode) but without that pesky dotted box.

Your dictum of NEVER changing the theme's appearance seems
rather harsh. I guess you'd advocate removing the command
"style configure".

Keith

Bryan Oakley

2006-09-29, 8:03 am

keithv wrote:
> Gerald W. Lester wrote:
>
>
>
> But I TRYING to get my app to look like "other applications".
>
> I'm siiting here on windows looking a the tools dialog in
> Microsoft IE and examining how the combobox works. It's
> looks and behaves just like tile's xpnative theme combobox
> (in readonly mode) but without that pesky dotted box.


Could the "pesky dotted box" simply be the default focus ring? I've
noticed that tile seems a bit overly agressive on assigning focus to
whatever button you last clicked on. If you have the combobox and
another tile button, and click the other tile button, does the dotted
box go away?



--
Bryan Oakley
http://www.tclscripting.com
Joe English

2006-09-29, 7:03 pm

Keith Vetter wrote:
>Gerald W. Lester wrote:
>
>But I TRYING to get my app to look like "other applications".
>
>I'm siiting here on windows looking a the tools dialog in
>Microsoft IE and examining how the combobox works. It's
>looks and behaves just like tile's xpnative theme combobox
>(in readonly mode) but without that pesky dotted box.


Odd -- all the readonly comboboxes I can find on Windows
do show a focus ring when they have focus. In fact there's
a special-purpose Combobox.focus element in win/winTheme.c
that implements precisely this behavior (IOW, this was
done on purpose):

/*
* ComboboxFocusElement --
* Read-only comboboxes have a focus ring, editable ones do not.
*/

However, the "native" comboboxes also fill the interior of
the focus rectangle with the selection color, which the
Tile combobox does not. Filed at SourceForge: #1567923;
will fix before the next release.

In the meantime, if you really want to get rid of the focus ring
in your applications, you can redefine the layout to omit it:

# Untested:
style theme settings winnative {
style layout TCombobox {
Combobox.field -sticky nwse -children {
Combobox.downarrow -side right -sticky ns -children {
Combobox.padding -side left -expand 1 -children {
Combobox.textarea -sticky nswe
}}}}}

You might also need to increase [style configure TCombobox -padding]
in the winnative and xpnative themes to compensate.

I wouldn't recommend this though -- readonly ttk::comboboxes don't
have any other focus indicators, so the user won't have any feedback
about which widget will receive key presses if you do this.


--Joe English
keithv

2006-09-29, 7:03 pm

Joe English wrote:
> Odd -- all the readonly comboboxes I can find on Windows
> do show a focus ring when they have focus.


When I went looking for a Window combobox, the first one I
found didn't have the focus ring. Now I can't find that one but
here's another example: MS Internet Explorer (I have version
6.0.2900) Tools->Internnet Options->Programs. The 6
comboboxes all are read-only and have no focus ring.

Keith

Joe English

2006-09-29, 7:03 pm

keithv wrote:
>Joe English wrote:
>
>When I went looking for a Window combobox, the first one I
>found didn't have the focus ring. Now I can't find that one but
>here's another example: MS Internet Explorer (I have version
>6.0.2900) Tools->Internnet Options->Programs. The 6
>comboboxes all are read-only and have no focus ring.


Are you *sure*? I'm looking at the same thing (MSIE
version 6.0.2900.2180.xsp_sp2.gdr.ahthehellwithit),
and the focus ring is there. It's a little hard to
see 'cause it's black and dark yellow dots against
a dark blue background, but it's definitely there.


--Joe English
keithv

2006-09-30, 4:01 am

> Are you *sure*? I'm looking at the same thing (MSIE
> version 6.0.2900.2180.xsp_sp2.gdr.ahthehellwithit),
> and the focus ring is there. It's a little hard to
> see 'cause it's black and dark yellow dots against
> a dark blue background, but it's definitely there.


Check out http://www.klimb.org/transfer/screen3.jpg

The screen shot on the left is from IE and I don't see
the focus ring. The screen shot on the right is from
Outlook and you definitely do see the focus ring.

I guess my real objection was that a combobox with
just a focus ring looks wrong. But my solution of
getting rid of it is also probably wrong--the better
solution is SourceForge: #1567923: setting the
interior to the selection color.

Thanks for looking at it.
Keith

Ramon Ribó

2006-09-30, 4:01 am


I've tried this example and I see:

- Just when opening this window there is no focus ring, ever after
pressing with the mouse on any combobox

- If I press the <Tab> key, then the focus ring appears and pressing
with the mouse in one combobox changes the focus and the ring to it

Maybe the criteria is just to show the ring for the very determined, who
know how to use the <Tab> key.

So, what seems to work different are not the decorations but the focus
changing policy.

Regards,

Ramon Ribó

En Fri, 29 Sep 2006 22:17:44 +0200, Joe English <jenglish@flightlab.com>
escribió:

> keithv wrote:
>
> Are you *sure*? I'm looking at the same thing (MSIE
> version 6.0.2900.2180.xsp_sp2.gdr.ahthehellwithit),
> and the focus ring is there. It's a little hard to
> see 'cause it's black and dark yellow dots against
> a dark blue background, but it's definitely there.
>
>
> --Joe English




--
Compass Ing. y Sistemas Dr. Ramon Ribo
http://www.compassis.com ramsan@compassis.com
c/ Tuset, 8 7-2 tel. +34 93 218 19 89
08006 Barcelona, Spain fax. +34 93 396 97 46
Gerald W. Lester

2006-09-30, 7:04 pm

Ramon Ribó wrote:
>
> I've tried this example and I see:
>
> - Just when opening this window there is no focus ring, ever after
> pressing with the mouse on any combobox
>
> - If I press the <Tab> key, then the focus ring appears and pressing
> with the mouse in one combobox changes the focus and the ring to it
>
> Maybe the criteria is just to show the ring for the very determined, who
> know how to use the <Tab> key.
>
> So, what seems to work different are not the decorations but the focus
> changing policy.


Are you **sure** because I see the focus ring in the example given (mind you
I had to get very close to the screen due to the color scheme, but it was
there).

>
> Regards,
>
> Ramon Ribó
>
> En Fri, 29 Sep 2006 22:17:44 +0200, Joe English <jenglish@flightlab.com>
> escribió:
>
>
>
>
> --Compass Ing. y Sistemas Dr. Ramon Ribo
> http://www.compassis.com ramsan@compassis.com
> c/ Tuset, 8 7-2 tel. +34 93 218 19 89
> 08006 Barcelona, Spain fax. +34 93 396 97 46



--
+--------------------------------+---------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
Ramon Ribó

2006-10-01, 7:05 pm


Before pressing <Tab> I see nothing. After pressing <Tab> I see it
perfectly.


Ramon Ribó

En Sat, 30 Sep 2006 16:14:04 +0200, Gerald W. Lester
<Gerald.Lester@cox.net> escribió:

> Ramon Ribó wrote:
>
> Are you **sure** because I see the focus ring in the example given (mind
> you I had to get very close to the screen due to the color scheme, but
> it was there).
>
>
>




--
Compass Ing. y Sistemas Dr. Ramon Ribo
http://www.compassis.com ramsan@compassis.com
c/ Tuset, 8 7-2 tel. +34 93 218 19 89
08006 Barcelona, Spain fax. +34 93 396 97 46
walton.paul@gmail.com

2006-10-01, 10:03 pm

This has always bothered me with Tile as well. It's one of the few
things that's inconsistent with other programs on Windows.

It's not just comboboxes either, although it's more apparent on
comboboxes which is probably because of the interior not being solidly
colored (currently only the text is highlighted). But you also see the
focus ring on buttons, checkbuttons, radiobuttons, and tabs.

In other programs, you never see the focus ring until you use the
keyboard to traverse the different fields, and then after you do that
the focus ring will always be there even if you click to move the
focus. Honestly, I think the only widget it looks bad on is the
combobox, and I think that's really because of the interior not being
entirely colored, so it's good to hear that that's being fixed.

By the way, while I'm here talking about Tile... I think my number one
wish-list feature is a multi-column listbox, as seen in the Windows
Task Manager. Are there any plans to implement this as a widget in
Tile?


Ramon Rib=F3 wrote:
> Before pressing <Tab> I see nothing. After pressing <Tab> I see it
> perfectly.
>
>
> Ramon Rib=F3
>
> En Sat, 30 Sep 2006 16:14:04 +0200, Gerald W. Lester
> <Gerald.Lester@cox.net> escribi=F3:
>
>
>
>
> --
> Compass Ing. y Sistemas Dr. Ramon Ribo
> http://www.compassis.com ramsan@compassis.com
> c/ Tuset, 8 7-2 tel. +34 93 218 19 89
> 08006 Barcelona, Spain fax. +34 93 396 97 46


John Smith

2006-10-01, 10:03 pm

walton.paul@gmail.com writes:

[snip]

> By the way, while I'm here talking about Tile... I think my number one
> wish-list feature is a multi-column listbox, as seen in the Windows
> Task Manager. Are there any plans to implement this as a widget in
> Tile?


I think Tile's tree widget can do the work nicely.

However, as it doesn't support horizontal scrollbars, its practical
use is limited.
Kevin Walzer

2006-10-02, 8:05 am

walton.paul@gmail.com wrote:

> By the way, while I'm here talking about Tile... I think my number one
> wish-list feature is a multi-column listbox, as seen in the Windows
> Task Manager. Are there any plans to implement this as a widget in
> Tile?


Csaba Nemethi's tablelist widget (with Tile bindings) works well here.

--
Kevin Walzer
Poetic Code
http://www.kevin-walzer.com
Joe English

2006-10-02, 10:04 pm

walton.paul wrote:

[ Re: appearance of dashed focus ring ]

>This has always bothered me with Tile as well. It's one of the few
>things that's inconsistent with other programs on Windows.
>
>It's not just comboboxes either, although it's more apparent on
>comboboxes which is probably because of the interior not being solidly
>colored (currently only the text is highlighted). But you also see the
>focus ring on buttons, checkbuttons, radiobuttons, and tabs.


That's consistent with other Windows applications
(at least as far as I've been able to determine).

>In other programs, you never see the focus ring until you use the
>keyboard to traverse the different fields, and then after you do that
>the focus ring will always be there even if you click to move the
>focus.


Could you elaborate on that? Tile should follow the MSUE guidelines
in that regard, and it matches the behavior of other Windows apps as
best as I can determine.

Now on the Mac, things are different -- Tile uses click-to-focus
in a lot of places that "native" OSX apps don't. KDE users
might notice a difference too (possibly depending on options
set in the KDE control panel, like everything else in KDE).
But keyboard focus behavior in Tile-based apps should at least
be consistent with Windows and Gnome.


>By the way, while I'm here talking about Tile... I think my number one
>wish-list feature is a multi-column listbox, as seen in the Windows
>Task Manager. Are there any plans to implement this as a widget in
>Tile?


There's several options to choose from. There's the [ttk::treeview]
widget, which can work as a multi-column listbox if you set
'-show {}' or '-show headings'. Then there's Bryan Oakley's
'mclistbox', which has a few more features; Csaba Nemethi's
'tablelist', which has even more (plus good integration with Tile);
and finally Tim Baker's TkTreeCtrl, which has more features than
you can shake three sticks at.

References:

ttk::treeview - http://tktable.sourceforge.net/tile/doc/treeview.html
mclistbox - http://www1.clearlight.com/~oakley/...tbox/index.html
tablelist - http://www.nemethi.privat.t-online....list/index.html
treectrl - http://tktreectrl.sourceforge.net/treectrl.html


--Joe English
walton.paul@gmail.com

2006-10-04, 7:02 pm

Hey Joe,

That's been my experience under Windows -- that you won't see the focus
rings until you start using the keyboard to move around the interface.
Perhaps this is tied to some setting in Windows, much like the "Hide
underlined letters for keyboard navigation until I press the Alt key"
option.

For an example of this behavior, I'm looking at the desktop properties
dialog on Windows XP sp2. (Desktop >> right-click >> Properties). If I
do everything with the mouse, I'll see no focus rings -- not on tabs,
buttons, combos, nor the checkbutton under the "Screen Saver" tab. But
as soon as I press the Tab key, all of the focus rings magically appear
at the appropiate times thereafter (until I close the window), whether
I'm clicking to give focus or tabbing. I think that the average
Windows user only uses their mouse, so these people never see these
focus rings and to see them without using the keyboard stands out as
odd to them.

And thanks for the multi-column listbox suggestions. I didn't realize
that the treeview could be used like that. That's pretty !

Paul

Joe English wrote:
> walton.paul wrote:
>
> [ Re: appearance of dashed focus ring ]
>
>
> That's consistent with other Windows applications
> (at least as far as I've been able to determine).
>
>
> Could you elaborate on that? Tile should follow the MSUE guidelines
> in that regard, and it matches the behavior of other Windows apps as
> best as I can determine.
>
> Now on the Mac, things are different -- Tile uses click-to-focus
> in a lot of places that "native" OSX apps don't. KDE users
> might notice a difference too (possibly depending on options
> set in the KDE control panel, like everything else in KDE).
> But keyboard focus behavior in Tile-based apps should at least
> be consistent with Windows and Gnome.
>
>
>
> There's several options to choose from. There's the [ttk::treeview]
> widget, which can work as a multi-column listbox if you set
> '-show {}' or '-show headings'. Then there's Bryan Oakley's
> 'mclistbox', which has a few more features; Csaba Nemethi's
> 'tablelist', which has even more (plus good integration with Tile);
> and finally Tim Baker's TkTreeCtrl, which has more features than
> you can shake three sticks at.
>
> References:
>
> ttk::treeview - http://tktable.sourceforge.net/tile/doc/treeview.html
> mclistbox - http://www1.clearlight.com/~oakley/...tbox/index.html
> tablelist - http://www.nemethi.privat.t-online....list/index.html
> treectrl - http://tktreectrl.sourceforge.net/treectrl.html
>
>
> --Joe English


Joe English

2006-10-05, 7:04 pm

walton.paul wrote:
>
>That's been my experience under Windows -- that you won't see the focus
>rings until you start using the keyboard to move around the interface.
>Perhaps this is tied to some setting in Windows, much like the "Hide
>underlined letters for keyboard navigation until I press the Alt key"
>option.


That must be it, 'cause all the Windows XP and WIN2K boxes
I've checked display the focus indicator at all times,
even before using keyboard navigation.

Can't seem to find the option anywhere, though. Maybe it's
something insidious -- I wonder if that damn puppy is hiding
in the background somewhere, saying "It looks like you're having
trouble operating your mouse [*]. Let me turn on keyboard
accessibility features for you!"


--Joe English

[*] Which is true.
Darren New

2006-10-05, 7:04 pm

Joe English wrote:
> Can't seem to find the option anywhere, though.


I think we're talking about this:

CP->Display->Appearance->Effects->Hide underlined letters...

Maybe there's something else somewhere too, tho.

--
Darren New / San Diego, CA, USA (PST)
Just because you find out you are
telepathic, don't let it go to your head.
Joe English

2006-10-05, 7:04 pm

Darren New wrote:
>Joe English wrote:
>
>I think we're talking about this:
>
>CP->Display->Appearance->Effects->Hide underlined letters...
>
>Maybe there's something else somewhere too, tho.


Aha! That's it!

If I turn that option on, then I see the behavior that Paul
describes. No focus ring on buttons, checkbuttons, notebook tabs,
or read-only comboboxes, until I press <Tab>.

Holding down the Alt key also makes the focus ring appear,
in addition to underlining the mnemonics.

Now if I can just figure out how to implement this in Tile...

Paul, is this a minor annoyance, or a serious usability issue?


--Joe English
walton.paul@gmail.com

2006-10-06, 4:05 am

Ah, you're right, that is it! That was the option I was talking about,
and I had tried turning it off to see if that was the cause, but now I
see I have to close and re-open the window I was testing it on for it
to actually take effect.

I would definitely say it's only a minor annoyance, but of course more
native-looking is better than less. Like I said, the only widget I
think it stands out on is the readonly combobox, and that's really
because of the interior not being fully highlighted.

Anyways, I'm glad it wasn't that damn evil animated puppy causing it!


Joe English wrote:
> Darren New wrote:
>
> Aha! That's it!
>
> If I turn that option on, then I see the behavior that Paul
> describes. No focus ring on buttons, checkbuttons, notebook tabs,
> or read-only comboboxes, until I press <Tab>.
>
> Holding down the Alt key also makes the focus ring appear,
> in addition to underlining the mnemonics.
>
> Now if I can just figure out how to implement this in Tile...
>
> Paul, is this a minor annoyance, or a serious usability issue?
>
>
> --Joe English


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com