Win32lib question

new topic     » goto parent     » topic index » view thread      » older message » newer message

Humm, we can do a lot of things with this wonderful library, but is there a
way to know the class of a control
with just an id ?
why ?  I have a lot of controls IDs in a sequence like this :

sequence s
....
s[1] = create( EditText, "", Win, 95, 0, 105, 20, 0 )
s[2] = create( DropDownList, "", Win, 95, 20, 105, 80, 0 )
s[3] = create( Radio, "", Win, 95, 60, 55, 20, 0 )
etc ...

and I want to copy all the values of these controls in one other sequence t
by example.

So I think I should probably do a thing like that :

for i=1 to length(s) do
    if integer ( s[i] ) and s[i] != 0 then   -- if it's a valid id

        if s[i] is an EditText control  then
            t=append(t, getText(s[i]) )
        elsif s[i] is an DropDownList control then
            t=append(t, getIndex(s[i]) )
        elsif etc ....

        end if

    end if
end for

But I don't know how to do.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu