<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[My Visual Database — How To edit Loop For Clear Multiple Edit Box ?]]></title>
		<link>https://myvisualdatabase.com/forum/viewtopic.php?id=8979</link>
		<atom:link href="https://myvisualdatabase.com/forum/extern.php?action=feed&amp;tid=8979&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in How To edit Loop For Clear Multiple Edit Box ?.]]></description>
		<lastBuildDate>Fri, 28 Jun 2024 11:03:11 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: How To edit Loop For Clear Multiple Edit Box ?]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=51165#p51165</link>
			<description><![CDATA[<p>It&#039;s not entirely clear what you want to achieve?<br />Decide on your goal.<br />It all depends on your task.<br />1 For example, fields that need to be cleared constantly may have a different name, even with numbers. <br />You can search by the initial letters of the name on the form and clear them. For example ClrEdit2, ClrEdit11.<br />2 You can assign a unique TAG to such EDITs and then access them by searching for the value in the TAG.<br />3 If you want to use a parity check, select for such Edits, for example, the range Edit21...Edit39. Take the name, read 2 characters from the end, convert to an integer, check parity and clear.<br />But is all this worth replacing 10 lines of code Edit1.clear...Edit10.clear.<br />If you want to reduce the number of lines in the script, write this:</p><div class="codebox"><pre><code>Form1.Edit1.Clear; Form1.Edit2.Clear; Form1.Edit3.Clear; Form1.Edit4.Clear; Form1.Edit5.Clear;
Form1.Edit6.Clear; Form1.Edit7.Clear; Form1.Edit8.Clear; Form1.Edit9.Clear; Form1.Edit10.Clear;</code></pre></div><p>This is also possible and only two lines.</p>]]></description>
			<author><![CDATA[null@example.com (sparrow)]]></author>
			<pubDate>Fri, 28 Jun 2024 11:03:11 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=51165#p51165</guid>
		</item>
		<item>
			<title><![CDATA[Re: How To edit Loop For Clear Multiple Edit Box ?]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=51157#p51157</link>
			<description><![CDATA[<div class="quotebox"><cite>jean.brezhonek wrote:</cite><blockquote><p>Oups I&#039;ve forgotten the snippet<br />JB</p></blockquote></div><br /><p>Thank&nbsp; JB Script It </p><div class="codebox"><pre><code>procedure frmEmployee_OnClose (Sender: string; Action: string);
var     i,c: integer;
begin
    c := frmEmployee.ComponentCount-1;
    for i := 0 to c do
    begin
        if frmEmployee.Components[i] is TdbEdit then TdbEdit(frmEmployee.Components[i]).Clear;       //  Dans le cas d&#039;un TEdit
        if frmEmployee.Components[i] is TdbMemo then TdbMemo(frmEmployee.Components[i]).Clear;       //  Dans le cas d&#039;un TMemo
    end;
end;
JB

✓ Check IF TdbEdit &gt;&gt;&gt; Clear Thank you JB</code></pre></div><p>Um..... And IF <br />1. TdbEdit ✓<br />2. copy(Component_Name,5,Length(Component_Name)) MOD 2 = 0 <br />How Do Edit Scipt ???</p><div class="codebox"><pre><code>Form1.Edit1.Text
Form1.Edit2.Clear // Because (1. TdbEdit)+ (2. Component_Name MOD 2 = 0)
Form1.Edit3.Text
Form1.Edit4.Clear // Because (1. TdbEdit)+ (2. Component_Name MOD 2 = 0)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (prahousefamily)]]></author>
			<pubDate>Fri, 28 Jun 2024 02:20:49 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=51157#p51157</guid>
		</item>
		<item>
			<title><![CDATA[Re: How To edit Loop For Clear Multiple Edit Box ?]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=51155#p51155</link>
			<description><![CDATA[<p>Oups I&#039;ve forgotten the snippet<br />JB</p>]]></description>
			<author><![CDATA[null@example.com (jean.brezhonek)]]></author>
			<pubDate>Thu, 27 Jun 2024 06:15:02 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=51155#p51155</guid>
		</item>
		<item>
			<title><![CDATA[Re: How To edit Loop For Clear Multiple Edit Box ?]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=51154#p51154</link>
			<description><![CDATA[<p>Hello Prahousefamily<br />You could use this snippet.<br />often use it and it makes the job.<br />JB</p>]]></description>
			<author><![CDATA[null@example.com (jean.brezhonek)]]></author>
			<pubDate>Thu, 27 Jun 2024 06:13:41 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=51154#p51154</guid>
		</item>
		<item>
			<title><![CDATA[How To edit Loop For Clear Multiple Edit Box ?]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=51153#p51153</link>
			<description><![CDATA[<p>I want to clear multiple edit boxes using the Loop method to reduce the number of lines in scripting. <br />Normally I write<br /></p><div class="codebox"><pre><code>Form1.Edit1.Clear ;
Form1.Edit2.Clear ;
Form1.Edit3.Clear ;
Form1.Edit4.Clear ;
Form1.Edit5.Clear ;
Form1.Edit6.Clear ;
Form1.Edit7.Clear ;
Form1.Edit8.Clear ;
Form1.Edit9.Clear ;
Form1.Edit10.Clear;</code></pre></div><p>But if I want to write a Loop?<br /></p><div class="codebox"><pre><code>For i := 1 To 10 do
  begin
    Form1.Edit[i].Clear ; // How To Edit Script 
  end;</code></pre></div><p>Help Me Please ?</p>]]></description>
			<author><![CDATA[null@example.com (prahousefamily)]]></author>
			<pubDate>Thu, 27 Jun 2024 03:24:18 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=51153#p51153</guid>
		</item>
	</channel>
</rss>
