Clear many objects

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
Vanguarda
Posts: 543
Joined: Wed Feb 11, 2009 10:56 am
Location: Americana - SP
Contact:

Clear many objects

Post by Vanguarda »

Hi HMG Brother´s,

Exist some way to clear many objects on my form better than:

Code: Select all

 Main.Text_1.Value := ""
 Main.Text_2.Value := ""
 Main.Text_3.Value := ""

With best regards,
--
Paulo Sérgio Durço (Vanguarda)


http://hmglights.wordpress.com/
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Clear many objects

Post by Rathinagiri »

Yes. May be this one useful.

Code: Select all

n := items_count
for i := 1 to n
   setproperty("main","Text_"+alltrim(str(i)),value,"")
next i
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Vanguarda
Posts: 543
Joined: Wed Feb 11, 2009 10:56 am
Location: Americana - SP
Contact:

Re: Clear many objects

Post by Vanguarda »

Hi friend Rathi,

Thanks for this solution. I´ll try it.

regards,
--
Paulo Sérgio Durço (Vanguarda)


http://hmglights.wordpress.com/
Post Reply