Prev: Link errors
Next: wxWidget
From: Iain William Wiseman on
Hi All,

Trying to use wxWidgets 2.6 for a relatively simple GUI for the first
time. Familiar with MFC, OpenClass and OWL but not GTK. (Yes Windows I'm
afraid)

I have

wxBoxSizer* m_BoxSizer = new wxBoxSizer(wxVERTICAL);
SetSizer(m_BoxSizer);
m_TreeCtrl = new wxTreeCtrl(this, ID_Users, wxDefaultPosition,
wxSize(300, 300), wxTR_DEFAULT_STYLE|wxTR_HIDE_ROOT);

m_TreeCtrl->AppendItem((wxTreeItemId *) 0, _T("Sprites"));
m_TreeCtrl->AppendItem((wxTreeItemId *) 0, _T("Tiles"));
m_TreeCtrl->AppendItem((wxTreeItemId *) 0, _T("Scripts"));

m_BoxSizer->Add(m_TreeCtrl, 1, wxEXPAND | wxALL,4);

Layout();
SetBestFittingSize();

In my Frame but no TreeCtrl appears, I was also curious to why there is
no destructor for the wxBoxSizer

Thanks, as ever, in advance

Iain
New Zealand



---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: Vadim Zeitlin on
[please don't post your messages twice, this really doesn't help to get
answers faster]

On Wed, 05 Apr 2006 22:23:20 +1200 Iain William Wiseman <bibble(a)paradise.net.nz> wrote:

IWW> I have
IWW>
IWW> wxBoxSizer* m_BoxSizer = new wxBoxSizer(wxVERTICAL);
IWW> SetSizer(m_BoxSizer);
IWW> m_TreeCtrl = new wxTreeCtrl(this, ID_Users, wxDefaultPosition,
IWW> wxSize(300, 300), wxTR_DEFAULT_STYLE|wxTR_HIDE_ROOT);
IWW>
IWW> m_TreeCtrl->AppendItem((wxTreeItemId *) 0, _T("Sprites"));
IWW> m_TreeCtrl->AppendItem((wxTreeItemId *) 0, _T("Tiles"));
IWW> m_TreeCtrl->AppendItem((wxTreeItemId *) 0, _T("Scripts"));

You can't pass NULLs here, use the root item instead. Let me give 2
advices related to the above bug, both of them can help you enormously with
wx:

1. build it in debug mode when developing (you would have got an assert
for the above if I'm not mistaken)
2. look at the samples when you start using an unfamiliar class

IWW> I was also curious to why there is no destructor for the wxBoxSizer

I assume you mean "why is there no delete statement for it". The answer is
that the sizers associated with the window get deleted by it automatically.
In general, any objects involved in the GUI (windows, sizers, ...) are
deleted by the library.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: Iain William Wiseman on
This was a copied piece of code example,

Ideally I was looking for a GUI designer to show me the way. wx 2.6.
Happy to manually code just want a decent worked example. I am
incredibly lazy and google is normally my friend.

Iain

Vadim Zeitlin wrote:
> [please don't post your messages twice, this really doesn't help to get
> answers faster]
>
> On Wed, 05 Apr 2006 22:23:20 +1200 Iain William Wiseman <bibble(a)paradise.net.nz> wrote:
>
> IWW> I have
> IWW>
> IWW> wxBoxSizer* m_BoxSizer = new wxBoxSizer(wxVERTICAL);
> IWW> SetSizer(m_BoxSizer);
> IWW> m_TreeCtrl = new wxTreeCtrl(this, ID_Users, wxDefaultPosition,
> IWW> wxSize(300, 300), wxTR_DEFAULT_STYLE|wxTR_HIDE_ROOT);
> IWW>
> IWW> m_TreeCtrl->AppendItem((wxTreeItemId *) 0, _T("Sprites"));
> IWW> m_TreeCtrl->AppendItem((wxTreeItemId *) 0, _T("Tiles"));
> IWW> m_TreeCtrl->AppendItem((wxTreeItemId *) 0, _T("Scripts"));
>
> You can't pass NULLs here, use the root item instead. Let me give 2
> advices related to the above bug, both of them can help you enormously with
> wx:
>
> 1. build it in debug mode when developing (you would have got an assert
> for the above if I'm not mistaken)
> 2. look at the samples when you start using an unfamiliar class
>
> IWW> I was also curious to why there is no destructor for the wxBoxSizer
>
> I assume you mean "why is there no delete statement for it". The answer is
> that the sizers associated with the window get deleted by it automatically.
> In general, any objects involved in the GUI (windows, sizers, ...) are
> deleted by the library.
>
> Regards,
> VZ
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: "Thomas Thomas" on

try http://boa-constructor.sourceforge.net/

cheers
Thomas
From: Fritz Elfert on
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Iain William Wiseman wrote (in wx-users ML):
> This was a copied piece of code example,
>
> Ideally I was looking for a GUI designer to show me the way. wx 2.6.
[...]

The two most prominent ones:

http://www.anthemion.co.uk/dialogblocks
and
http://www.roebling.de/

more tools listed on http://www.wxwidgets.org/contrib2.htm#tools

I have evaluated both and found DialogBlocks MUCH easyer and intuitive.
Also, the demo version limits the number of widgets only while
wxDesigner demo doesn't permit to save.

- --
Fritz Elfert <fritz.elfert(a)innovidata.com> InnoviData GmbH
Lilienthalstr. 2 Phone: +49 711 88770 112
70825 Stuttgart FAX: +49 711 88770 299
- ------------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFENGMIboM4mAMyprARAo2zAJ48vzDRznhur27JWgQThHnXMkchGwCdGVhQ
todCUDF8k44mqUhBFI0a/4E=
=CCA1
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

 |  Next  |  Last
Pages: 1 2
Prev: Link errors
Next: wxWidget