Board index » delphi » New Delphi programmer (old VB programmer)

New Delphi programmer (old VB programmer)

I would like ot know of the equivilent in delphi for VB controll
arrayas.

I would like to write a generic event handleler for several command
buttons, and have it act on the index of the button pushed.

from what I see there is no way to do it in delphi because the
controls dont have an index proporty.

I have tried to use a common event handeler, and the sender proporty
with a case statement, but it does not seam to me to be as efficiant
as a controll array.

you also cannot create controlls at runtime with out it.

any help would be greatly appreciated.

p.s. please excuse the horrid typing, as i have been up for a full 24
hours now, and am typing with one eye shut.

also, if you could be so kind to CC a copy of your response by email
to me, that would be great!

thanks again!

==================================================
Raymond R cassick                 rayc...@slic.com
Chairman ___                  Phone: (315)764-5534
(company yet to me named)     Fax:   (315)764-5534
PO BOX 8094
Massena, NY
13662
==================================================

 

Re:New Delphi programmer (old VB programmer)


Quote
Raymond Richard Cassick wrote:

> I would like ot know of the equivilent in delphi for VB controll
> arrayas.

> I would like to write a generic event handleler for several command
> buttons, and have it act on the index of the button pushed.

 You can make it using the Tag property of the buttons, and a case
statement.
 Hope this helps

--
Fabrice Desre
d...@osiris.lgs.jussieu.fr

Re:New Delphi programmer (old VB programmer)


Quote
>I would like ot know of the equivilent in delphi for VB controll
>arrayas.

        First thing you need to do is program in Delphi with Delphi, not VB.

Quote
>I would like to write a generic event handleler for several command
>buttons, and have it act on the index of the button pushed.

        Easy, attach them all to the same handler.

Quote
>from what I see there is no way to do it in delphi because the
>controls dont have an index proporty.

        They don't need one.

Quote
>I have tried to use a common event handeler, and the sender proporty
>with a case statement, but it does not seam to me to be as efficiant
>as a controll array.

        Use the tag property to store your number.

Quote
>you also cannot create controlls at runtime with out it.

        In VB you cannot. You need to stop thinking in those ridiculous confines of the
god awful thing that is perpetuated to be a programming language.

_
******************************************************************
NOTE: This software is currently in early alpha. If you notice any
problems, or RFC non-compliance, please report it to p...@pobox.com
-Please do not report duplicates, as this is usually a manual resend
-Still working on the references problem......It WILL get fixed
+------------------------------------------------------------+
|Chad Z. Hower  -  phoe...@pobox.com                         |
|Phoenix Business Enterprises - p...@pobox.com - www.pbe.com  |
|Physically in Church Hill, TN - Logically Not Sure          |
+------------------------------------------------------------+

Quote
>>SQUID - The ultimate 95/NT offline databasing reader

**Special Compile: 3.000A (Alpha)

Other Threads