<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to create a TabControl in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-create-a-TabControl/m-p/246062#M5423</link>
    <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Here is an example how it can be implemented.&lt;BR /&gt;
1. Let see how resource file looks like. Two things is needed&lt;BR /&gt;
&lt;BR /&gt;
1.1 First you need to add a TabControl item (e.g. NormalTab or SingleTab) to the corresponding dialog:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;'GDLG'  32590  Modal | grow    300  300  387  350  "TabControl Dialog" {
/* [  1] */ Button				  308  311   70   20	LargePlain  "OK"
/* [  2] */ NormalTab			   12   12  364  285
                 32591  NoIcon  "TabPage1"
}

'DLGH'  32590  DLG_32590_TabControl_Dialog {
1	""							Button_0
2	""							NormalTab_0
}
&lt;/PRE&gt;

As you see next to the 'OK' button here we have a NormalTab control and one TabPage&lt;BR /&gt;
(it's important to add at least one TabPage to the TabControl otherwise resource file&lt;BR /&gt;
won't compile).&lt;BR /&gt;
&lt;BR /&gt;
1.2 After TabControl is added to the dialog, TabPages (you can define any of them) also should&lt;BR /&gt;
be defined:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;'GDLG'  32591  TabPage       0    0  256  121  "TabPage1" {
/* [  1] */ LeftText			    6   10  100   18	LargePlain  vCenter  "Some text"
/* [  2] */ TextEdit			   87    7  106   23	LargePlain  255
}

'DLGH'  32591  DLG_32591_TabPage1 {
1	""							LeftText_0
2	""							TextEdit_0
}
&lt;/PRE&gt;

I added a LeftText and a TextEdit to the corresponding TabPage in this example just to see&lt;BR /&gt;
something on the screen.&lt;BR /&gt;
&lt;BR /&gt;
2. The C++ header contains a dialog and an observer class. You can overload any&lt;BR /&gt;
virtual functions of NormalTabObserver to change the TabControl default behavior:&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;#ifndef (TABCONTROL_DIALOG_HPP)
#define TABCONTROL_DIALOG_HPP

#include	"DG.h"
#include	"DGModule.hpp"


#define TABCONTROL_DIALOG_RESID			32590

// --- TabControl Dialog -----------------------------------------------

class TabControlDialog: public DG::ModalDialog
{
	friend class TabControlObserver;

private:

	enum {
		OkButtonId	= 1,
		TabControlId	= 2,
	};

	DG::NormalTab		mTabControl;
	DG::Button		mOkButton;

public:

	TabControlDialog	(GSResModule dialResModule, short resId);
	~TabControlDialog	();
};

// --- TabControlObserver -----------------------------------------------

class TabControlObserver:	public DG::PanelObserver,
					public DG::NormalTabObserver,
					public DG::ButtonItemObserver,
					public DG::CompoundItemObserver
{
private:
	TabControlDialog*		mDialog;

protected:
	// DG::PanelObserver
	virtual void	PanelOpened (const DG::PanelOpenEvent&amp;amp; ev) override;

	// DG::ButtonItemObserver
	virtual void	ButtonClicked (const DG::ButtonClickEvent&amp;amp; ev) override;

public:
	explicit		TabControlObserver (TabControlDialog* testDialog);
	~TabControlObserver ();
};

#endif // TABCONTROL_DIALOG_HPP
&lt;/PRE&gt;

3. In the C++ source file you can find how the dialog is initialized.&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;#include	"TabControlDialog.hpp"
#include	"DGMenu.hpp"
#include	"DGTabControl.hpp"


//---------------------------- Class TabControlDialog -----------------------

TabControlDialog::TabControlDialog (GSResModule dialResModule, short resId):
	DG::ModalDialog		(dialResModule, resId, dialResModule),
	mOkButton			(GetReference (), OkButtonId),
	mTabControl			(GetReference (), TabControlId)
{
}


TabControlDialog::~TabControlDialog ()
{
}


//-------------------------- Class TabControlObserver -----------------------

TabControlObserver::TabControlObserver (TabControlDialog* testDialog):
	mDialog (testDialog)
{
	mDialog-&amp;gt;Attach (*this);
	AttachToAllItems (*mDialog);
}


TabControlObserver::~TabControlObserver ()
{
	mDialog-&amp;gt;Detach (*this);
	DetachFromAllItems (*mDialog);
}


void TabControlObserver::PanelOpened (const DG::PanelOpenEvent&amp;amp; /*ev*/)
{
	mDialog-&amp;gt;SetClientSize (mDialog-&amp;gt;GetOriginalClientWidth (), mDialog-&amp;gt;GetOriginalClientHeight ());
}


void TabControlObserver::ButtonClicked (const DG::ButtonClickEvent&amp;amp; ev)
{
	// Close dialog with acceptance
	if (ev.GetSource () == &amp;amp;mDialog-&amp;gt;mOkButton) {
		mDialog-&amp;gt;PostCloseRequest (DG::ModalDialog::Accept);
	}
}
&lt;/PRE&gt;

&lt;BR /&gt;
After all of that you have a dialog with a TabControl.&lt;BR /&gt;
&lt;BR /&gt;
Best Regards,</description>
    <pubDate>Mon, 23 Feb 2015 12:40:20 GMT</pubDate>
    <dc:creator>Tamas Zolnai</dc:creator>
    <dc:date>2015-02-23T12:40:20Z</dc:date>
    <item>
      <title>[SOLVED] How to create a TabControl</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-create-a-TabControl/m-p/246061#M5422</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hello&lt;BR /&gt;&lt;BR /&gt;My goal is to create a TabControl but I can not find an example in DevKit folder. &lt;BR /&gt;&lt;BR /&gt;I want to achieve this &lt;S&gt;&lt;/S&gt;&lt;A href="http://www.graphisoft.com/ftp/techsupport/documentation/developer_docs/AC_10/APIDevKit/DialogManager/DGHtmlLibrary/TabControl.html" target="_blank"&gt;www.graphisoft.com/ftp/techsupport/documentation/developer_docs/AC_10/APIDevKit/DialogManager/DGHtmlLibrary/TabControl.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Please advise.&lt;/DIV&gt;</description>
      <pubDate>Tue, 01 Aug 2023 11:39:56 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-create-a-TabControl/m-p/246061#M5422</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-01T11:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a TabControl</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-create-a-TabControl/m-p/246062#M5423</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Here is an example how it can be implemented.&lt;BR /&gt;
1. Let see how resource file looks like. Two things is needed&lt;BR /&gt;
&lt;BR /&gt;
1.1 First you need to add a TabControl item (e.g. NormalTab or SingleTab) to the corresponding dialog:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;'GDLG'  32590  Modal | grow    300  300  387  350  "TabControl Dialog" {
/* [  1] */ Button				  308  311   70   20	LargePlain  "OK"
/* [  2] */ NormalTab			   12   12  364  285
                 32591  NoIcon  "TabPage1"
}

'DLGH'  32590  DLG_32590_TabControl_Dialog {
1	""							Button_0
2	""							NormalTab_0
}
&lt;/PRE&gt;

As you see next to the 'OK' button here we have a NormalTab control and one TabPage&lt;BR /&gt;
(it's important to add at least one TabPage to the TabControl otherwise resource file&lt;BR /&gt;
won't compile).&lt;BR /&gt;
&lt;BR /&gt;
1.2 After TabControl is added to the dialog, TabPages (you can define any of them) also should&lt;BR /&gt;
be defined:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;'GDLG'  32591  TabPage       0    0  256  121  "TabPage1" {
/* [  1] */ LeftText			    6   10  100   18	LargePlain  vCenter  "Some text"
/* [  2] */ TextEdit			   87    7  106   23	LargePlain  255
}

'DLGH'  32591  DLG_32591_TabPage1 {
1	""							LeftText_0
2	""							TextEdit_0
}
&lt;/PRE&gt;

I added a LeftText and a TextEdit to the corresponding TabPage in this example just to see&lt;BR /&gt;
something on the screen.&lt;BR /&gt;
&lt;BR /&gt;
2. The C++ header contains a dialog and an observer class. You can overload any&lt;BR /&gt;
virtual functions of NormalTabObserver to change the TabControl default behavior:&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;#ifndef (TABCONTROL_DIALOG_HPP)
#define TABCONTROL_DIALOG_HPP

#include	"DG.h"
#include	"DGModule.hpp"


#define TABCONTROL_DIALOG_RESID			32590

// --- TabControl Dialog -----------------------------------------------

class TabControlDialog: public DG::ModalDialog
{
	friend class TabControlObserver;

private:

	enum {
		OkButtonId	= 1,
		TabControlId	= 2,
	};

	DG::NormalTab		mTabControl;
	DG::Button		mOkButton;

public:

	TabControlDialog	(GSResModule dialResModule, short resId);
	~TabControlDialog	();
};

// --- TabControlObserver -----------------------------------------------

class TabControlObserver:	public DG::PanelObserver,
					public DG::NormalTabObserver,
					public DG::ButtonItemObserver,
					public DG::CompoundItemObserver
{
private:
	TabControlDialog*		mDialog;

protected:
	// DG::PanelObserver
	virtual void	PanelOpened (const DG::PanelOpenEvent&amp;amp; ev) override;

	// DG::ButtonItemObserver
	virtual void	ButtonClicked (const DG::ButtonClickEvent&amp;amp; ev) override;

public:
	explicit		TabControlObserver (TabControlDialog* testDialog);
	~TabControlObserver ();
};

#endif // TABCONTROL_DIALOG_HPP
&lt;/PRE&gt;

3. In the C++ source file you can find how the dialog is initialized.&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;#include	"TabControlDialog.hpp"
#include	"DGMenu.hpp"
#include	"DGTabControl.hpp"


//---------------------------- Class TabControlDialog -----------------------

TabControlDialog::TabControlDialog (GSResModule dialResModule, short resId):
	DG::ModalDialog		(dialResModule, resId, dialResModule),
	mOkButton			(GetReference (), OkButtonId),
	mTabControl			(GetReference (), TabControlId)
{
}


TabControlDialog::~TabControlDialog ()
{
}


//-------------------------- Class TabControlObserver -----------------------

TabControlObserver::TabControlObserver (TabControlDialog* testDialog):
	mDialog (testDialog)
{
	mDialog-&amp;gt;Attach (*this);
	AttachToAllItems (*mDialog);
}


TabControlObserver::~TabControlObserver ()
{
	mDialog-&amp;gt;Detach (*this);
	DetachFromAllItems (*mDialog);
}


void TabControlObserver::PanelOpened (const DG::PanelOpenEvent&amp;amp; /*ev*/)
{
	mDialog-&amp;gt;SetClientSize (mDialog-&amp;gt;GetOriginalClientWidth (), mDialog-&amp;gt;GetOriginalClientHeight ());
}


void TabControlObserver::ButtonClicked (const DG::ButtonClickEvent&amp;amp; ev)
{
	// Close dialog with acceptance
	if (ev.GetSource () == &amp;amp;mDialog-&amp;gt;mOkButton) {
		mDialog-&amp;gt;PostCloseRequest (DG::ModalDialog::Accept);
	}
}
&lt;/PRE&gt;

&lt;BR /&gt;
After all of that you have a dialog with a TabControl.&lt;BR /&gt;
&lt;BR /&gt;
Best Regards,</description>
      <pubDate>Mon, 23 Feb 2015 12:40:20 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-create-a-TabControl/m-p/246062#M5423</guid>
      <dc:creator>Tamas Zolnai</dc:creator>
      <dc:date>2015-02-23T12:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a TabControl</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-create-a-TabControl/m-p/246063#M5424</link>
      <description>Thank you for the answer!</description>
      <pubDate>Mon, 23 Feb 2015 15:57:10 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-create-a-TabControl/m-p/246063#M5424</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-23T15:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a TabControl</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-create-a-TabControl/m-p/246064#M5425</link>
      <description>&lt;BLOCKQUOTE&gt;Tamás wrote:&lt;BR /&gt;Hi,&lt;BR /&gt;
&lt;BR /&gt;
Here is an example how it can be implemented.&lt;BR /&gt;
1. Let see how resource file looks like. Two things is needed&lt;BR /&gt;
&lt;BR /&gt;
1.1 First you need to add a TabControl item (e.g. NormalTab or SingleTab) to the corresponding dialog:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;'GDLG'  32590  Modal | grow    300  300  387  350  "TabControl Dialog" {
/* [  1] */ Button				  308  311   70   20	LargePlain  "OK"
/* [  2] */ NormalTab			   12   12  364  285
                 32591  NoIcon  "TabPage1"
}

'DLGH'  32590  DLG_32590_TabControl_Dialog {
1	""							Button_0
2	""							NormalTab_0
}
&lt;/PRE&gt;

As you see next to the 'OK' button here we have a NormalTab control and one TabPage&lt;BR /&gt;
(it's important to add at least one TabPage to the TabControl otherwise resource file&lt;BR /&gt;
won't compile).&lt;BR /&gt;
&lt;BR /&gt;
1.2 After TabControl is added to the dialog, TabPages (you can define any of them) also should&lt;BR /&gt;
be defined:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;'GDLG'  32591  TabPage       0    0  256  121  "TabPage1" {
/* [  1] */ LeftText			    6   10  100   18	LargePlain  vCenter  "Some text"
/* [  2] */ TextEdit			   87    7  106   23	LargePlain  255
}

'DLGH'  32591  DLG_32591_TabPage1 {
1	""							LeftText_0
2	""							TextEdit_0
}
&lt;/PRE&gt;

I added a LeftText and a TextEdit to the corresponding TabPage in this example just to see&lt;BR /&gt;
something on the screen.&lt;BR /&gt;
&lt;BR /&gt;
2. The C++ header contains a dialog and an observer class. You can overload any&lt;BR /&gt;
virtual functions of NormalTabObserver to change the TabControl default behavior:&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;#ifndef (TABCONTROL_DIALOG_HPP)
#define TABCONTROL_DIALOG_HPP

#include	"DG.h"
#include	"DGModule.hpp"


#define TABCONTROL_DIALOG_RESID			32590

// --- TabControl Dialog -----------------------------------------------

class TabControlDialog: public DG::ModalDialog
{
	friend class TabControlObserver;

private:

	enum {
		OkButtonId	= 1,
		TabControlId	= 2,
	};

	DG::NormalTab		mTabControl;
	DG::Button		mOkButton;

public:

	TabControlDialog	(GSResModule dialResModule, short resId);
	~TabControlDialog	();
};

// --- TabControlObserver -----------------------------------------------

class TabControlObserver:	public DG::PanelObserver,
					public DG::NormalTabObserver,
					public DG::ButtonItemObserver,
					public DG::CompoundItemObserver
{
private:
	TabControlDialog*		mDialog;

protected:
	// DG::PanelObserver
	virtual void	PanelOpened (const DG::PanelOpenEvent&amp;amp; ev) override;

	// DG::ButtonItemObserver
	virtual void	ButtonClicked (const DG::ButtonClickEvent&amp;amp; ev) override;

public:
	explicit		TabControlObserver (TabControlDialog* testDialog);
	~TabControlObserver ();
};

#endif // TABCONTROL_DIALOG_HPP
&lt;/PRE&gt;

3. In the C++ source file you can find how the dialog is initialized.&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;#include	"TabControlDialog.hpp"
#include	"DGMenu.hpp"
#include	"DGTabControl.hpp"


//---------------------------- Class TabControlDialog -----------------------

TabControlDialog::TabControlDialog (GSResModule dialResModule, short resId):
	DG::ModalDialog		(dialResModule, resId, dialResModule),
	mOkButton			(GetReference (), OkButtonId),
	mTabControl			(GetReference (), TabControlId)
{
}


TabControlDialog::~TabControlDialog ()
{
}


//-------------------------- Class TabControlObserver -----------------------

TabControlObserver::TabControlObserver (TabControlDialog* testDialog):
	mDialog (testDialog)
{
	mDialog-&amp;gt;Attach (*this);
	AttachToAllItems (*mDialog);
}


TabControlObserver::~TabControlObserver ()
{
	mDialog-&amp;gt;Detach (*this);
	DetachFromAllItems (*mDialog);
}


void TabControlObserver::PanelOpened (const DG::PanelOpenEvent&amp;amp; /*ev*/)
{
	mDialog-&amp;gt;SetClientSize (mDialog-&amp;gt;GetOriginalClientWidth (), mDialog-&amp;gt;GetOriginalClientHeight ());
}


void TabControlObserver::ButtonClicked (const DG::ButtonClickEvent&amp;amp; ev)
{
	// Close dialog with acceptance
	if (ev.GetSource () == &amp;amp;mDialog-&amp;gt;mOkButton) {
		mDialog-&amp;gt;PostCloseRequest (DG::ModalDialog::Accept);
	}
}
&lt;/PRE&gt;

&lt;BR /&gt;
After all of that you have a dialog with a TabControl.&lt;BR /&gt;
&lt;BR /&gt;
Best Regards,&lt;/BLOCKQUOTE&gt;

Thanks but somewhere I have to call TabControlObserver class right ? oterwise TabControlObserver class doesn't run</description>
      <pubDate>Wed, 25 Feb 2015 07:07:31 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-create-a-TabControl/m-p/246064#M5425</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-25T07:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a TabControl</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-create-a-TabControl/m-p/246065#M5426</link>
      <description>&lt;BLOCKQUOTE&gt;ggiloyan wrote:&lt;BR /&gt;Thanks but somewhere I have to call TabControlObserver class right ? oterwise TabControlObserver class doesn't run&lt;/BLOCKQUOTE&gt; &lt;BR /&gt;
 &lt;BR /&gt;
To show the dialog you should call this method: 
&lt;PRE&gt;static void		Show_TabControlDialog (void) 
{ 
	TabControlDialog		dialog (ACAPI_GetOwnResModule (), 32590); 
	if (DBERROR (dialog.GetId () == 0)) { 
		return; 
	} 
 
	TabControlObserver		observer (&amp;amp;dialog); 
	dialog.Invoke (); 
	return; 
}&lt;/PRE&gt; &lt;BR /&gt;
Regards, &lt;BR /&gt;
Tibor</description>
      <pubDate>Wed, 25 Feb 2015 12:38:45 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-create-a-TabControl/m-p/246065#M5426</guid>
      <dc:creator>Tibor Lorantfy</dc:creator>
      <dc:date>2015-02-25T12:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a TabControl</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-create-a-TabControl/m-p/246066#M5427</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Additional thing. If you need to define the behavior of your TabPage, you should create seperate&lt;BR /&gt;
TabPage and TabPageObserver classes like this:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;#include	"DGTabPage.hpp"
#include	"DGEditControl.hpp"
#include	"APIEnvir.h"
#include	"ACAPinc.h"


//---------------------------- Class MyTabPage -----------------------


class MyTabPage: public DG::TabPage
{
	friend class MyTabPageObserver;

private:
	enum {
		TextEditId		= 2
	};

	DG::TextEdit	mTextEdit;

public:

	MyTabPage	(const DG::TabControl&amp;amp; tabControl, short tabItem);
	~MyTabPage	(void);
};

MyTabPage::MyTabPage (const DG::TabControl&amp;amp; tabControl, short tabItem):
	DG::TabPage			(tabControl, tabItem, ACAPI_GetOwnResModule(), 32591, ACAPI_GetOwnResModule ()),
	mTextEdit			(GetReference (), TextEditId)
{

}


MyTabPage::~MyTabPage ()
{
}

//---------------------------- Class MyTabPageObserver -----------------------


class MyTabPageObserver:	public	DG::PanelObserver,
							public  DG::CompoundItemObserver
{

private:
	MyTabPage*		mTabPage;

protected:
	// DG::PanelObserver
	virtual void	PanelClosed (const DG::PanelCloseEvent&amp;amp; ev) override;

public:
	explicit		MyTabPageObserver (MyTabPage* tabPage);
	~MyTabPageObserver (void);
};


MyTabPageObserver::MyTabPageObserver (MyTabPage* tabPage):
mTabPage (tabPage)
{
	mTabPage-&amp;gt;Attach (*this);
	AttachToAllItems (*mTabPage);
}


MyTabPageObserver::~MyTabPageObserver ()
{
	mTabPage-&amp;gt;Detach (*this);
	DetachFromAllItems (*mTabPage);
}


void MyTabPageObserver::PanelClosed (const DG::PanelCloseEvent&amp;amp; ev)
{
	if (ev.GetSource () == mTabPage) {
		DGAlert(DG_INFORMATION, "Information box", "Text changed in the text edit to:", mTabPage-&amp;gt;mTextEdit.GetText(),"OK");
	}
}
&lt;/PRE&gt;

After you have these classes you need to use them inside your dialog class&lt;BR /&gt;
("-": removed line, "+": added line, "": no change):
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;class TabControlDialog: public DG::ModalDialog
{
	friend class TabControlObserver;

private:

	enum {
		OkButtonId	= 1,
		TabControlId	= 2,
		TabPageId		= 3,
	};

	DG::NormalTab        mTabControl;
	DG::Button           mOkButton;
+  MyTabPage*           mTabPage;
+  MyTabPageObserver*   mTabPageObserver;

public:

	TabControlDialog	(GSResModule dialResModule, short resId);
	~TabControlDialog	();
};
&lt;/PRE&gt;

In the constructor you can create the TabPage and link it with the Observer object:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;TabControlDialog::TabControlDialog (GSResModule dialResModule, short resId):
	DG::ModalDialog	  (dialResModule, resId, dialResModule),
	mOkButton           (GetReference (), OkButtonId),
	mTabControl         (GetReference (), TabControlId),
+  mTabPage            (new MyTabPage (mTabControl, 1)),
+  mTabPageObserver    (new MyTabPageObserver (mTabPage))
{
}
&lt;/PRE&gt;

Also take care of the dynamically allocated objects:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;TabControlDialog::~TabControlDialog ()
{
+	delete mTabPageObserver;
+	delete mTabPage;
}
&lt;/PRE&gt;

With these additional changes the new TabControl dialog will write out the text typed into the&lt;BR /&gt;
text edit on the first TabPage when the dialog is closed.&lt;BR /&gt;
&lt;BR /&gt;
Best Regards,</description>
      <pubDate>Thu, 26 Feb 2015 15:22:02 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-create-a-TabControl/m-p/246066#M5427</guid>
      <dc:creator>Tamas Zolnai</dc:creator>
      <dc:date>2015-02-26T15:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a TabControl</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-create-a-TabControl/m-p/246067#M5428</link>
      <description>Now everything is clear. Thank you for the detailed answer!</description>
      <pubDate>Fri, 27 Feb 2015 13:48:35 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-How-to-create-a-TabControl/m-p/246067#M5428</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-27T13:48:35Z</dc:date>
    </item>
  </channel>
</rss>

