From: abirbasak on
Hi,
I have a wxBoxSizer for wxFrame. A wxSplitterWindow is attached to
wxBoxSizer. I wan't to fill the wxFrame with the wxSplitterWindow when
the frame is resizing. How to do it using wxSizerFlags ?

From: "Iulian-Nicu Serbanoiu" on
Add( your_splitter_window, 1, wxGROW ) when you add it to the sizer ?

more details here:
http://www.wxwindows.org/manuals/2.6.3/wx_wxsizer.html#wxsizeradd

or in your local chm help file ( or any other help format you downloaded )

HTH,

Iulian

On 16 Aug 2006 04:20:45 -0700, abirbasak(a)gmail.com <abirbasak(a)gmail.com> wrote:
>
> Hi,
> I have a wxBoxSizer for wxFrame. A wxSplitterWindow is attached to
> wxBoxSizer. I wan't to fill the wxFrame with the wxSplitterWindow when
> the frame is resizing. How to do it using wxSizerFlags ?
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
>
>

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

From: abirbasak on

"Iulian-Nicu Serbanoiu" wrote:
> Add( your_splitter_window, 1, wxGROW ) when you add it to the sizer ?
>
> more details here:
> http://www.wxwindows.org/manuals/2.6.3/wx_wxsizer.html#wxsizeradd
>
> or in your local chm help file ( or any other help format you downloaded )
My code looks like,
InkControl* inkControl = new InkControl(this);
wxBoxSizer* inkSizer = new wxBoxSizer(wxHORIZONTAL);
inkSizer->Add(inkControl,wxSizerFlags(1).Expand().Centre());
this->SetSizer(inkSizer);

The code is inside a Frame, which is derived from wxFrame.
InkControl is a control derived from wxControl. Irrespective of
InkControl's size ( which is set to wxDefaultSize here) , I want it to
occupy the full parent window. But it resides at the top left corner,
with it's default size.
even inkSizer->Add(inkControl,1,wxGROW); also have same effect
changing InkControl to a wxButton neither helps.
also wxGROW is not mentioned in document or the link.

Moreover when I use wxSashLayoutWindow, also same kind of problem
happens.
now if I add this->DoLayout(); then it gets filled by the control,
however on resizing it do not stretch it anymore (I am not having a
resize event, as I think sizer will resize it automatically, otherwise
one need to add resize event to every resizable window!)

One more problem,
Any example for using thread in a gui for time consuming work? like
I want a function to be called when the user presses a button, but in s
seperate thread, otherwise the GUI will be non-responsive.
> HTH,
>
> Iulian
>
> On 16 Aug 2006 04:20:45 -0700, abirbasak(a)gmail.com <abirbasak(a)gmail.com> wrote:
> >
> > Hi,
> > I have a wxBoxSizer for wxFrame. A wxSplitterWindow is attached to
> > wxBoxSizer. I wan't to fill the wxFrame with the wxSplitterWindow when
> > the frame is resizing. How to do it using wxSizerFlags ?
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
> > For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: "Iulian-Nicu Serbanoiu" on
wxBoxSizer *topSizer = new wxBoxSizer( wxVERTICAL );
// Create text ctrl with minimal size 100x60
topSizer->Add(
new wxButton( this, wxID_OK, wxT("tada") ),
1,wxGROW);

SetSizer( topSizer ); // use the sizer for layout

This code put in a wxFrame based object works fine here.

Regards,

Iulian

On 16 Aug 2006 22:02:49 -0700, abirbasak(a)gmail.com <abirbasak(a)gmail.com> wrote:
>
>
> "Iulian-Nicu Serbanoiu" wrote:
> > Add( your_splitter_window, 1, wxGROW ) when you add it to the sizer ?
> >
> > more details here:
> > http://www.wxwindows.org/manuals/2.6.3/wx_wxsizer.html#wxsizeradd
> >
> > or in your local chm help file ( or any other help format you downloaded )
> My code looks like,
> InkControl* inkControl = new InkControl(this);
> wxBoxSizer* inkSizer = new wxBoxSizer(wxHORIZONTAL);
> inkSizer->Add(inkControl,wxSizerFlags(1).Expand().Centre());
> this->SetSizer(inkSizer);
>
> The code is inside a Frame, which is derived from wxFrame.
> InkControl is a control derived from wxControl. Irrespective of
> InkControl's size ( which is set to wxDefaultSize here) , I want it to
> occupy the full parent window. But it resides at the top left corner,
> with it's default size.
> even inkSizer->Add(inkControl,1,wxGROW); also have same effect
> changing InkControl to a wxButton neither helps.
> also wxGROW is not mentioned in document or the link.
>
> Moreover when I use wxSashLayoutWindow, also same kind of problem
> happens.
> now if I add this->DoLayout(); then it gets filled by the control,
> however on resizing it do not stretch it anymore (I am not having a
> resize event, as I think sizer will resize it automatically, otherwise
> one need to add resize event to every resizable window!)
>
> One more problem,
> Any example for using thread in a gui for time consuming work? like
> I want a function to be called when the user presses a button, but in s
> seperate thread, otherwise the GUI will be non-responsive.
> > HTH,
> >
> > Iulian
> >
> > On 16 Aug 2006 04:20:45 -0700, abirbasak(a)gmail.com <abirbasak(a)gmail.com> wrote:
> > >
> > > Hi,
> > > I have a wxBoxSizer for wxFrame. A wxSplitterWindow is attached to
> > > wxBoxSizer. I wan't to fill the wxFrame with the wxSplitterWindow when
> > > the frame is resizing. How to do it using wxSizerFlags ?
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
> > > For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
> > For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
>
>

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

From: abirbasak on

"Iulian-Nicu Serbanoiu" wrote:
> wxBoxSizer *topSizer = new wxBoxSizer( wxVERTICAL );
> // Create text ctrl with minimal size 100x60
> topSizer->Add(
> new wxButton( this, wxID_OK, wxT("tada") ),
> 1,wxGROW);
>
> SetSizer( topSizer ); // use the sizer for layout
>
> This code put in a wxFrame based object works fine here.
I had used EVT_SIZE for the wxFrame, which doing nothing, and layout
mechanism was not working. Removing the event works fine. However I
want to do something OnSize for the frame. Will I call frame->OnSize()
first on the event handler first, before my custom code?
Thanks for reply.
abir
> Regards,
>
> Iulian
>
> On 16 Aug 2006 22:02:49 -0700, abirbasak(a)gmail.com <abirbasak(a)gmail.com> wrote:
> >
> >
> > "Iulian-Nicu Serbanoiu" wrote:
> > > Add( your_splitter_window, 1, wxGROW ) when you add it to the sizer ?
> > >
> > > more details here:
> > > http://www.wxwindows.org/manuals/2.6.3/wx_wxsizer.html#wxsizeradd
> > >
> > > or in your local chm help file ( or any other help format you downloaded )
> > My code looks like,
> > InkControl* inkControl = new InkControl(this);
> > wxBoxSizer* inkSizer = new wxBoxSizer(wxHORIZONTAL);
> > inkSizer->Add(inkControl,wxSizerFlags(1).Expand().Centre());
> > this->SetSizer(inkSizer);
> >
> > The code is inside a Frame, which is derived from wxFrame.
> > InkControl is a control derived from wxControl. Irrespective of
> > InkControl's size ( which is set to wxDefaultSize here) , I want it to
> > occupy the full parent window. But it resides at the top left corner,
> > with it's default size.
> > even inkSizer->Add(inkControl,1,wxGROW); also have same effect
> > changing InkControl to a wxButton neither helps.
> > also wxGROW is not mentioned in document or the link.
> >
> > Moreover when I use wxSashLayoutWindow, also same kind of problem
> > happens.
> > now if I add this->DoLayout(); then it gets filled by the control,
> > however on resizing it do not stretch it anymore (I am not having a
> > resize event, as I think sizer will resize it automatically, otherwise
> > one need to add resize event to every resizable window!)
> >
> > One more problem,
> > Any example for using thread in a gui for time consuming work? like
> > I want a function to be called when the user presses a button, but in s
> > seperate thread, otherwise the GUI will be non-responsive.
> > > HTH,
> > >
> > > Iulian
> > >
> > > On 16 Aug 2006 04:20:45 -0700, abirbasak(a)gmail.com <abirbasak(a)gmail.com> wrote:
> > > >
> > > > Hi,
> > > > I have a wxBoxSizer for wxFrame. A wxSplitterWindow is attached to
> > > > wxBoxSizer. I wan't to fill the wxFrame with the wxSplitterWindow when
> > > > the frame is resizing. How to do it using wxSizerFlags ?
> > > >
> > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
> > > > For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
> > > For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
> > For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
> >
> >
>
> ---------------------------------------------------------------------
> 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: Unresolved externals
Next: Odd link error