comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Combobox / Droplist index problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Combobox / Droplist index problem [message #40349 is a reply to message #40261] Sun, 01 August 2004 23:50 Go to previous message
basson is currently offline  basson
Messages: 4
Registered: June 2003
Junior Member
"Christopher Lee" <cl@127.0.0.1> wrote in message news:<20040730.155357.1186452551.29225@buckley.atm.ox.ac.uk>...
> In article <8f9f5929.0407300202.20215269@posting.google.com>, "Jacques
> Basson" <basson@cyclops.nu.ac.za> wrote:
>
>
>> I have stumbled across a problem with retrieving the index in a combobox
>> if you have some items with identical text.
>
> I think the point of combobox is that you don't need to rely on the index
> number, you get the value returned in the event (ev.str). Comboboxes also
> allow the user to write their option in (if you allow it :) in which case
> a -1 is returned for the index.
>
> I suspect the combobox is returning the first result from a naive WHERE
> command, hence the -1 when the selection isn't found in the original
> list.
>
> Also, what's the difference between the first '2', and the second '2'? How
> does the user differentiate between them if they have the same labels?
>
> Chris.

I suspect that you're right about the WHERE - possibly some limitation
of the motif toolkit (which is why it works on Windows).

As for the difference, obviously this is a contrived example (so that
I don't post reams of irrelevant code), but the user (who may not
think too hard) is providing the values that eventually appear in the
combobox. Selecting a value will fill in another combobox with dates,
and this allows the distinction to be made. Yes, it is bad practice on
the user's side and may never occur, but I'd prefer to cater for it if
possible.

Jacques
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Translate characters/string size to data/normal coordinates?
Next Topic: serial port

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 23:04:15 PDT 2025

Total time taken to generate the page: 1.36273 seconds