On 4/27/07, Klaas Holwerda <[EMAIL PROTECTED]> wrote:
> Hi John,
>
> If i put in the piece of code down here the wxListBox as control and instead 
> of the m_luaConsole.
> The dialog sizes to the listbox nicely.
> But for some reason wxLuaIDE refuses to this, in fact the dialog is reduced 
> to 0 height.
>
> Do you have any idea why there is this difference?

It probably has something to do with
GetBestSize/GetBestFittingSize/GetMinSize etc... There was a change in
these recently that I didn't follow too closely and have always been
confused by what they really do. In your case however, the min size
should be set to 400x400 since that's what used to happen.

Try the code out below?

Hope this helps,
    John Labenski

> a2dLuaExecDlg::a2dLuaExecDlg( a2dLuaWrapper* commandProcessor, wxFrame* 
> parent, const wxString& title,long style, const
> wxString& name):
>         wxDialog(parent,-1,title,wxDefaultPosition,wxDefaultSize,style,name)
> {
>         m_parent = parent;
>
>      wxBoxSizer* itemBoxSizer = new wxBoxSizer(wxVERTICAL);
>      SetSizer(itemBoxSizer);
>
>      m_luaConsole = new wxLuaIDE( this, wxID_ANY, 
> wxDefaultPosition,wxSize(400,400) );


        m_luaConsole->SetInitialSize(wxSize(400,400);

and/or

        m_luaConsole->SetMinSize(wxSize(400,400);


>      itemBoxSizer->Add(m_luaConsole, 1, wxGROW|wxALL, 0);
>
>      //wxListBox* listbox = new wxListBox( this, -1, wxDefaultPosition, 
> wxSize(100,500), 0, NULL,
> wxLB_SINGLE|wxLB_NEEDED_SB );
>      //itemBoxSizer->Add(listbox, 1, wxGROW|wxALL, 0);
>
>      GetSizer()->FitInside(this);
>      GetSizer()->SetSizeHints(this);
>      Centre();
> }
>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to