RE: Help with combobox functionality !!
- From: "Freddie Unpenstein" <fredderic excite com>
- To: poonam13 gmail com
- Cc: gtk-app-devel-list gnome org
- Subject: RE: Help with combobox functionality !!
- Date: Sun, 10 Apr 2005 22:00:19 -0400 (EDT)
1) I am using the combobox in my application now i want the
functionality that whenever user types in the combobox the
selection changes in the list
Someone else will undoubtedly answer this far better than I can...
But be aware that there are several signals associated with selecting something in the combo box. One means
that an item has been picked from the list (and pasted into the text box), and the other means that the user
has finished typing and pressed enter (activate). Then there's one which gets called for every key entered
into the combobox.
It SHOULD be built in functionality, from the sounds of it. Are you sure the combobox is in non-editable
mode (I'd guess from your question, that's what you're trying to do -- and might have some handy features),
and have you checked that there aren't any gtk_combobox_set_xxxxx type functions which will do what you want?
Just go looking through the documentation.
2) Also wanted to ask how to check that user has selected the
option in the combobox and then only he is allowed to proceed....
accordingly....???
I presume there's be some kind of "Ok", "Next" or "Yes" button somewhere... A general solution I usually use
is to write a function that validates the widgets, and enables and disables (sensitivity) the Ok button
depending on whether they've all got legal values. If one doesn't, I usually try to highlight it somehow;
last time I put a blank icon after the widget, and then swap it to a red cross if there's a problem. I used
to change the text to red, but some widgets refused to change colours, so I changed the label text colour to
red. But that won't work if your theme is very red. So I changed to the icons, though they take up
unneccesary space -- but at least they'll always work. ;)
But basically, every time a field changes (toggle buttons get toggled, text fields get text, etc.), just call
the verify function (assuming it isn't too long) and let it enable to disable the Ok/Next/Yes button as
appropriate, and possibly either flag the problem field to bring the users attention to it. (If there's more
than one problem, please flag them all!)
An alternative to disabling the On/Next/Yes button, is to throw up a dialog box -- though I personally detest
those annoying dialog boxes telling you to fill in some field or another. If you are going to do that, be
nice to the user and select the first problem field for them.
Is there anything about this kind of stuff in the usability guides?
Fredderic
_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]