1. Getting the ID of a combobox's edit box.

------=_NextPart_000_0063_01C0845C.A8AF6AE0
        charset="iso-8859-1"

Hi Win32lib developers,
here is a routine to get the ID of a combobox's editbox. This can be =
used to handle keystroke processing.

-------------
object CBedit
-- Combo boxes are automatically 'subclassed' by win32lib.
CBedit =3D findChildren(TheCombo)
for i =3D 1 to length(CBedit) do
    if CBedit[i][2] =3D EditText then
        -- get the ID to use.
        CBedit =3D CBedit[i][1]
        exit
    end if
end for

------
Derek Parnell
Melbourne, Australia
(Vote [1] The Cheshire Cat for Internet Mascot)


------=_NextPart_000_0063_01C0845C.A8AF6AE0
        charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4611.1300" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi Win32lib developers,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>here is a routine to get the ID of a =
combobox's=20
editbox. This can be used to handle keystroke processing.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>-------------</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>object CBedit</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>-- Combo boxes are automatically =
'subclassed' by=20
win32lib.<BR>CBedit&nbsp;=3D findChildren(TheCombo)<BR>for i =3D 1 to =
length(CBedit)=20
do<BR>&nbsp;&nbsp;&nbsp; if CBedit[i][2] =3D EditText then</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- get=20
the ID to use.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CBedit =
=3D=20
exit<BR>&nbsp;&nbsp;&nbsp; end if<BR>end for<BR></DIV></FONT>
<DIV><FONT face=3DArial size=3D2>------<BR>Derek Parnell<BR>Melbourne,=20
Australia<BR>(Vote [1] The Cheshire Cat for Internet=20

------=_NextPart_000_0063_01C0845C.A8AF6AE0--

new topic     » topic index » view message » categorize

2. Re: Getting the ID of a combobox's edit box.

Hi Derek,

Did you try that code out to see if you could intercept char events
once the id is obtained?

--Al

new topic     » goto parent     » topic index » view message » categorize

3. Re: Getting the ID of a combobox's edit box.

Yes, I did, and I could successfully handle onKeyPress and onKeyDown for the
subclassed ID.

------
Derek Parnell
Melbourne, Australia
(Vote [1] The Cheshire Cat for Internet Mascot)

----- Original Message -----
From: "Al Getz" <xaxo at AOL.COM>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Monday, January 22, 2001 10:49 AM
Subject: Re: Getting the ID of a combobox's edit box.


> Hi Derek,
>
> Did you try that code out to see if you could intercept char events
> once the id is obtained?
>
> --Al

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu