On Jan 7, 2008 2:27 PM, John Labenski <[EMAIL PROTECTED]> wrote:
> These are common in wxWidgets in GTK even with C++ code. All it means
> in this case is that the wxSizer is trying to size the wxFrame or
> wxButton before it had a chance to get a valid size so it's using
> wx.wxDefaultSize = (-1, -1).
OK. How come the application just doesn't work?
> Here is a bit more information. It displays the frame as a very small
> frame
> > or as a VERY long titlebar only. It displays the errors in the terminal
> when
> > I run it. If I comment out the SetSizeHints() I get the frame to show up
> > correctly, but it only has the menu. I don't see the controls. This
> works on
> > Windows, but not on Linux. I hope I am doing something wrong.
>
> Not really, but you might want to provide some positive initial size
> for the wxFrame to get rid of the warnings.
I already tried this and it didn't work either. I send another email about
wxSizer::Add() in Windows not functioning correctly when wxLua is used as a
Lua module. I wonder if this has anything to do with that.
> Also and I hope this is all it takes (can't test now) is that you
> create a single wxPanel child of the wxFrame. A single wxPanel child
> of a wxFrame takes the client size of the wxFrame and then you use a
> wxSizer to hold the children of the panel. Note how the sizer is for
> the panel, but we set the size hints for the wxFrame.
>
> frame = wx.wxFrame(wx.NULL, -1, "wxLua module sample")
> panel = wx.wxPanel(frame, -1)
>
> -- Layout all the buttons using wxSizers
> local mainSizer = wx.wxBoxSizer( wx.wxVERTICAL )
> local ID_BUTTON = 1001
> local buildButton = wx.wxButton( panel, ID_BUTTON, "Button1" )
> mainSizer:Add( buildButton, 0, wx.wxALL + wx.wxEXPAND, 5 )
> panel:SetSizer( mainSizer )
> mainSizer:SetSizeHints( frame )
>
In the real application that I am trying to write I do use a wxPanel. It
still doesn't work. I can send the source for the application if that would
help? It is just a bit larger. It does function when you double-click on the
lua file. (I used the installer to register the OPEN command with wxLua) ANy
other ideas?
I will check to make sure that I am I am SetSizeHints() on the frame.
--
Regards,
Ryan
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users