How to set up a frame maximized in Smith?

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
tap1956
Earned a small fee
Earned a small fee
Posts: 11
Joined: Thu Mar 05, 2020 8:05 pm

How to set up a frame maximized in Smith?

Post by tap1956 » Fri Mar 06, 2020 4:44 pm

I would like the frame to full screen mode on the entire PC display when starting up. Please tell me how to program such a frame behavior.

User avatar
doublemax
Moderator
Moderator
Posts: 14992
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: How to set up a frame maximized in Smith?

Post by doublemax » Fri Mar 06, 2020 5:00 pm

Go into the source file where the wxFrame code was generated.

You'll see something like this:

Code: Select all

test1Frame::test1Frame(wxWindow* parent,wxWindowID id)
{
    //(*Initialize(test1Frame)

    Initialization code here

   //*)
}
Everything between the "//(*" and "//*)" is autogenerated, don't make any changes there.

But after the last line, you can add your own code. Depending on what you want, you can either call Maximize() or ShowFullScreen().
Use the source, Luke!

tap1956
Earned a small fee
Earned a small fee
Posts: 11
Joined: Thu Mar 05, 2020 8:05 pm

Re: How to set up a frame maximized in Smith?

Post by tap1956 » Fri Mar 06, 2020 7:58 pm

In my project, I did not find such code. The project has attached.
Attachments
FrameBuilder.zip
(14.04 KiB) Downloaded 22 times

User avatar
doublemax
Moderator
Moderator
Posts: 14992
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: How to set up a frame maximized in Smith?

Post by doublemax » Fri Mar 06, 2020 8:05 pm

You said wxSmith, but your project uses wxFormBuilder. Just add the line (Maximize() or ShowFullScreen()) at the end of the GUIFrame constructror.
Use the source, Luke!

tap1956
Earned a small fee
Earned a small fee
Posts: 11
Joined: Thu Mar 05, 2020 8:05 pm

Re: How to set up a frame maximized in Smith?

Post by tap1956 » Sun Mar 08, 2020 6:50 pm

Accidentally attached the wrong project. Thanks for the answer, everything worked out. I tried Frame-> Maximize (true) everything worked.

Post Reply