<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[PunBB Forums — C++ Builder, How do I pass argument to Click Button]]></title>
		<link>https://punbb.informer.com/forums/topic/3822/c-builder-how-do-i-pass-argument-to-click-button/</link>
		<atom:link href="https://punbb.informer.com/forums/feed/rss/topic/3822/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in C++ Builder, How do I pass argument to Click Button.]]></description>
		<lastBuildDate>Fri, 14 May 2004 10:57:33 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: C++ Builder, How do I pass argument to Click Button]]></title>
			<link>https://punbb.informer.com/forums/post/13751/#p13751</link>
			<description><![CDATA[<div class="quotebox"><cite>Chacmool wrote:</cite><blockquote><p>You can access the button-info from the Sender-pointer like this:<br /></p><div class="codebox"><pre><code>AnsiString caption = ((TButton*)Sender)-&gt;Caption</code></pre></div></blockquote></div><p>Thanks for that it works fine, although I could not access the caption property so I used the objects name instead ie:</p><p>AnsiString caption = ((TButton*)Sender)-&gt;Name</p><p>PM</p>]]></description>
			<author><![CDATA[null@example.com (Paul Marsland)]]></author>
			<pubDate>Fri, 14 May 2004 10:57:33 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/13751/#p13751</guid>
		</item>
		<item>
			<title><![CDATA[Re: C++ Builder, How do I pass argument to Click Button]]></title>
			<link>https://punbb.informer.com/forums/post/13702/#p13702</link>
			<description><![CDATA[<p>You can access the button-info from the Sender-pointer like this:<br /></p><div class="codebox"><pre><code>AnsiString caption = ((TButton*)Sender)-&gt;Caption</code></pre></div><p>If you want to pass more stuff to the function add, just add it manually in the function, and don&#039;t forget to change the .h-file too.</p>]]></description>
			<author><![CDATA[null@example.com (Chacmool)]]></author>
			<pubDate>Thu, 13 May 2004 09:22:07 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/13702/#p13702</guid>
		</item>
		<item>
			<title><![CDATA[Re: C++ Builder, How do I pass argument to Click Button]]></title>
			<link>https://punbb.informer.com/forums/post/13700/#p13700</link>
			<description><![CDATA[<div class="quotebox"><cite>Chacmool wrote:</cite><blockquote><p>Yes it is possible... don&#039;t fully understand what you mean though...</p></blockquote></div><p>If I had a function called add that required two integer arguments, and returned an integer, its prototype would look like this:</p><p>int add(int a, int b)</p><p>to call this function I would use the following syntax:</p><p>add(1, 2)</p><p>this would return 3</p><p>Now if I wanted to pass an argument to a function in Builder (Button1Click in this case) is it possible to pass an argument directly (as oppose to picking up values from elsewhere. the reason I want to do this is to avoid having to use Global scope variables.</p><p>I have now actually recoded my program differently and now require to determine the name of the Sender variable passed to the Button1Click function. ie was it initiated from a Button Click or called from another area of the program. I know this is possible but don&#039;t know how to do it. Any Help appreciated.</p>]]></description>
			<author><![CDATA[null@example.com (Paul Marsland)]]></author>
			<pubDate>Thu, 13 May 2004 08:36:41 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/13700/#p13700</guid>
		</item>
		<item>
			<title><![CDATA[Re: C++ Builder, How do I pass argument to Click Button]]></title>
			<link>https://punbb.informer.com/forums/post/13673/#p13673</link>
			<description><![CDATA[<p>Yes it is possible... don&#039;t fully understand what you mean though...</p>]]></description>
			<author><![CDATA[null@example.com (Chacmool)]]></author>
			<pubDate>Wed, 12 May 2004 15:39:18 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/13673/#p13673</guid>
		</item>
		<item>
			<title><![CDATA[C++ Builder, How do I pass argument to Click Button]]></title>
			<link>https://punbb.informer.com/forums/post/13672/#p13672</link>
			<description><![CDATA[<p>I am trying to run a function within C++ Builder when the user clicks a button. The function requires a pointer to a custom object as an argument. Is it possible to pass the argument to the button code.</p><p>ie: ThisRec is a pointer to an object how do I pass this as an argument to the button?</p><p>void __fastcall TForm1::Button1Click(TObject *Sender)<br />{<br />&nbsp; RefreshTable(ThisRec);<br />}</p>]]></description>
			<author><![CDATA[null@example.com (Paul Marsland)]]></author>
			<pubDate>Wed, 12 May 2004 15:20:29 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/13672/#p13672</guid>
		</item>
	</channel>
</rss>
