<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Chartfx1-&amp;gt;Value[0] = xx;  durch eine Edit1 eigabe einfügen]]></title><description><![CDATA[<pre><code class="language-cpp">//---------------------------------------------------------------------------

#include &lt;vcl.h&gt;
#pragma hdrstop

#include &quot;Unit1.h&quot;

//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource &quot;*.dfm&quot;
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button1Click(TObject *Sender)
{
Chartfx1-&gt;OpenDataEx(COD_VALUES,2,5);

Chartfx1-&gt;ThisSerie = 0;
Chartfx1-&gt;Value[0] = 30;
Chartfx1-&gt;Value[1] = 20;
Chartfx1-&gt;Value[2] = 40;
Chartfx1-&gt;Value[3] = 60;
Chartfx1-&gt;Value[4] = 50;

Chartfx1-&gt;CloseData(COD_VALUES);
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Edit1Change(TObject *Sender)
{

}
//---------------------------------------------------------------------------
</code></pre>
<p>ich wieder, jemand nen tip für mich wie ich :</p>
<p>Chartfx1-&gt;ThisSerie = 0;<br />
Chartfx1-&gt;Value[0] = xx; wo xx steht soll ein fach die zahlen eingabe von einer Edit1 rein komme.</p>
<p>...<br />
...</p>
<p>für nen kleinen netten tip wer ich sehr dankbar <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/82687/chartfx1-gt-value-0-xx-durch-eine-edit1-eigabe-einfügen</link><generator>RSS for Node</generator><lastBuildDate>Wed, 01 Jul 2026 08:20:02 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/82687.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 13 Aug 2004 08:28:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Chartfx1-&amp;gt;Value[0] = xx;  durch eine Edit1 eigabe einfügen on Fri, 13 Aug 2004 08:28:55 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">//---------------------------------------------------------------------------

#include &lt;vcl.h&gt;
#pragma hdrstop

#include &quot;Unit1.h&quot;

//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource &quot;*.dfm&quot;
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button1Click(TObject *Sender)
{
Chartfx1-&gt;OpenDataEx(COD_VALUES,2,5);

Chartfx1-&gt;ThisSerie = 0;
Chartfx1-&gt;Value[0] = 30;
Chartfx1-&gt;Value[1] = 20;
Chartfx1-&gt;Value[2] = 40;
Chartfx1-&gt;Value[3] = 60;
Chartfx1-&gt;Value[4] = 50;

Chartfx1-&gt;CloseData(COD_VALUES);
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Edit1Change(TObject *Sender)
{

}
//---------------------------------------------------------------------------
</code></pre>
<p>ich wieder, jemand nen tip für mich wie ich :</p>
<p>Chartfx1-&gt;ThisSerie = 0;<br />
Chartfx1-&gt;Value[0] = xx; wo xx steht soll ein fach die zahlen eingabe von einer Edit1 rein komme.</p>
<p>...<br />
...</p>
<p>für nen kleinen netten tip wer ich sehr dankbar <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/581687</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/581687</guid><dc:creator><![CDATA[*23*]]></dc:creator><pubDate>Fri, 13 Aug 2004 08:28:55 GMT</pubDate></item><item><title><![CDATA[Reply to Chartfx1-&amp;gt;Value[0] = xx;  durch eine Edit1 eigabe einfügen on Fri, 13 Aug 2004 08:37:41 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>verstehe ich richtig (nur die Zuweisung des Edits) <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
<p>sollte so funktionieren<br />
Chartfx1-&gt;Value[0] = Edit1-&gt;Text.ToIntDef(0);<br />
oder<br />
Chartfx1-&gt;Value[0] = Edit1-&gt;Text.ToInt();</p>
<p>MfG<br />
Klaus</p>
]]></description><link>https://www.c-plusplus.net/forum/post/581697</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/581697</guid><dc:creator><![CDATA[KlausB]]></dc:creator><pubDate>Fri, 13 Aug 2004 08:37:41 GMT</pubDate></item><item><title><![CDATA[Reply to Chartfx1-&amp;gt;Value[0] = xx;  durch eine Edit1 eigabe einfügen on Fri, 13 Aug 2004 09:20:34 GMT]]></title><description><![CDATA[<p>jow danke geht jetzt auch 1a THX</p>
<pre><code class="language-cpp">//---------------------------------------------------------------------------

#include &lt;vcl.h&gt;
#pragma hdrstop

#include &quot;Unit1.h&quot;
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource &quot;*.dfm&quot;
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button1Click(TObject *Sender)
{
Chartfx1-&gt;Visible = !Chartfx1-&gt;Visible;

Chartfx1-&gt;OpenDataEx(COD_VALUES,2,5);

Chartfx1-&gt;ThisSerie = 0;
Chartfx1-&gt;Value[0] = Edit1-&gt;Text.ToInt();
Chartfx1-&gt;Value[1] = Edit2-&gt;Text.ToInt();
Chartfx1-&gt;Value[2] = Edit3-&gt;Text.ToInt();
Chartfx1-&gt;Value[3] = Edit4-&gt;Text.ToInt();
Chartfx1-&gt;Value[4] = Edit5-&gt;Text.ToInt();

Chartfx1-&gt;CloseData(COD_VALUES);

}

//---------------------------------------------------------------------------
</code></pre>
<p>hast du auch ne idee wie ich es am besten mache, wenn kein wert in eine von den Edit`s eigetragen ist ? das da ne ShowMessage kommt oder so. ich hab es schon mit na if.schleife versucht sprich</p>
<p>if(Edit1 == &quot;&quot;)<br />
{<br />
ShowMessage();<br />
}<br />
else<br />
{<br />
Chartfx1-&gt;ThisSerie = 0;<br />
Chartfx1-&gt;Value[0] = Edit1-&gt;Text.ToInt();<br />
Chartfx1-&gt;Value[1] = Edit2-&gt;Text.ToInt();<br />
Chartfx1-&gt;Value[2] = Edit3-&gt;Text.ToInt();<br />
Chartfx1-&gt;Value[3] = Edit4-&gt;Text.ToInt();<br />
Chartfx1-&gt;Value[4] = Edit5-&gt;Text.ToInt();</p>
<p>}</p>
]]></description><link>https://www.c-plusplus.net/forum/post/581747</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/581747</guid><dc:creator><![CDATA[*23*]]></dc:creator><pubDate>Fri, 13 Aug 2004 09:20:34 GMT</pubDate></item><item><title><![CDATA[Reply to Chartfx1-&amp;gt;Value[0] = xx;  durch eine Edit1 eigabe einfügen on Fri, 13 Aug 2004 09:43:35 GMT]]></title><description><![CDATA[<p>|23| schrieb:</p>
<blockquote>
<p>wo xx steht soll ein fach die zahlen eingabe von einer Edit1 rein komme.</p>
</blockquote>
<p>Nochmal zur Verinnerlichung: im Edit stehen keine Zahlen, dort stehen nur Zeichen. Deshalb muss der Edit-Inhalt ggf. explizit in Zahlenwerte umgewandelt werden, z.B. mit ToInt().</p>
<p>Zu deiner letzten Frage:<br />
Pack die Edits alle auf ein gemeinsames Panel (ggf. ohne Border, also unsichtbar), dann kannst du sie leicht in einer Schleife abarbeiten und musst nicht die komplette Liste in den Quelltext schreiben.</p>
<pre><code class="language-cpp">// alle Controls auf dem Panel abklappern
  for (int i = 0; i &lt; Panel1-&gt;ControlCount; i++)
  {
    // temporäres TEdit-Objekt erzeugen und dem aktuellen Control des Panels zuweisen
    TEdit *ed = dynamic_cast&lt;TEdit*&gt;(Panel1-&gt;Controls[i]);
    if (ed) // wenn Zuweisung erfolgreich
    {
      // hier könnte erst noch eine Prüfung auf zulässigen Edit-Inhalt stehen

      // jetzt Inhalt übergeben
      Chartfx1-&gt;Value[i] = ed-&gt;Text.ToInt();
    }
  }
</code></pre>
<p>Und noch eine Bitte zu deinen Code-Beispielen: bitte beschränke sie auf das wesentliche. Wir müssen nicht jedesmal die Standardzeilen wie die include-Liste, den Form-konstruktor usw. sehen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/581770</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/581770</guid><dc:creator><![CDATA[Jansen]]></dc:creator><pubDate>Fri, 13 Aug 2004 09:43:35 GMT</pubDate></item><item><title><![CDATA[Reply to Chartfx1-&amp;gt;Value[0] = xx;  durch eine Edit1 eigabe einfügen on Fri, 13 Aug 2004 15:32:03 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>|23| schrieb:</p>
<blockquote>
<p>if(Edit1 == &quot;&quot;) ...</p>
</blockquote>
<p>das funktioniert nicht. Edit1 ist nie &quot;&quot; höhstens der Text von dem Edit....</p>
<p>MfG</p>
<p>Alexander Sulfrian</p>
]]></description><link>https://www.c-plusplus.net/forum/post/582161</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/582161</guid><dc:creator><![CDATA[Alexander Sulfrian]]></dc:creator><pubDate>Fri, 13 Aug 2004 15:32:03 GMT</pubDate></item></channel></rss>