Re: How can I get index when combox changed

On Tue, 2001-08-28 at 17:01, zxf3436 wrote:
How can I get index of text in entry when combox changed


 one combox item has three string:"aaa","bbb","ccc",I can get text in entry ("bbb") when combox changed,but 
I can't get number 2,any idea?

I've attached a program that does what you're asking. It's not pretty,
but then, I don't think there *is* a pretty way to do far as I
can see you need to access the list inside the combo to get this.

Anyway, the program shows two things:

        1. How you look up the index of the entry string (which I think
           is what you were asking for), and
        2. how you can keep track of list-selections in the combo, since
           that has been discussed resently on the list(s).

The select_callback function does the stuff from 2., while the
text_changed does the stuff from 1.


I used up all my sick days, so I'm calling in dead.

Attachment: main3.c
Description: Text Data

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