Re: how to make radio buttons without default selected? and, how to force all de-selected?



On Wed, Jan 26, 2005 at 05:27:08PM -0400, agan ufam edu br wrote:
> Hi Ben ...
> 
> IMHO I think that it is not a good idea , because the radio button's
> "definitions", in essence, do not allow that none button to be active.
> Maybe, to customize the radio button, and create a new widget based on it
> may be a good solution.

Hi Antonio

I think your english is very clear.  Here is my humble opinion:

As you might expect, I disagree, though not entirely.  I think the
current behavior is good as a default.  That's because it's what
people/users expect from the widget type and surprising them with
changes to standard behavior leads to confused users, which is very,
very bad.

However, *forcing a programmer* to follow these conventions takes away
from the power of the widget and therefore, really, the utility of the
library.  If, for instance, the purpose of a program is to show what bad
interface design is...  or, perhaps, to play a joke on some friends, or,
to get to the point, to allow a user of the program to de-select a
toggle button that happens to be part of a group of toggle buttons, then
I think it's not unreasonable to *allow* the programmer to make it
happen.

Also, I think it's important to keep in mind that this widget is not
simply a GtkRadioButton.  It is also a group of exclusively selectable
GtkToggleButtons.  When displayed as a series Toggle Buttons, I think it
actually makes more sense to allow none of the options to be selected,
and to allow the user to simply de-select the currently selected button.

I'm all for standards when they're really useful.  I agree that changing
widely used file formats and "extending" protocols is bad because it breaks
compatibility.  When it comes to widget libraries though, what is there
to worry about?

One other things...  if I'm not mistaken, creating a sub-class of the
Radio Button will not help me solve my problem because there will still
be no way for me to de-select an item.  The approach I would need to
take is making new subclass of the GtkToggleButton.  Unfortunately, this
approach will end up re-creating most of the same behavior of the Radio
Button, which seems like a lot of work to make something that really
already exists.

sorry I'm so long winded.

- Ben




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]