Author Topic: ScrollingDialog  (Read 15614 times)

Rossifumi

  • Guest
ScrollingDialog
« on: February 08, 2011, 04:36:39 pm »
Hi, i'm new in this forum...i'm an italian student so previously sorry for my english.
I've a problem with CodeBlocks + wxSmith:

i need to use a scrollingdialog, so i've used the command in wxsmith to add a scrollingdialog to my project, and i draw all my widgets. But when i build my project i receive an error in -->#include "scrollingdialog.h".

How can i resolve it?
i've read some topics in this forum, but i don't find any answers.

i'm working on windows 7 64 bit.

thanks.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: ScrollingDialog
« Reply #1 on: February 08, 2011, 05:15:37 pm »
You need scrollingdialog.h and scrollingdialog.cpp from our sdk to make it work.
You can either download C::B's sources and extract them or download them from my server:
http://apt.jenslody.de/downloads/scrollingdialog.cpp
http://apt.jenslody.de/downloads/scrollingdialog.h

Just copy both in your projects folder and add them to your project.

Rossifumi

  • Guest
Re: ScrollingDialog
« Reply #2 on: February 08, 2011, 05:25:25 pm »
Thank you so much....
All rights. Now i've my scrollingdialog!!!! :lol: :lol:

Rossifumi

  • Guest
Re: ScrollingDialog
« Reply #3 on: February 09, 2011, 11:57:47 am »
Another thing...is it possible to set the size of the scrollingdialog window??
because it has a full height...thanks.
« Last Edit: February 09, 2011, 12:17:27 pm by Rossifumi »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: ScrollingDialog
« Reply #4 on: February 09, 2011, 02:59:10 pm »
It should work as for "real" wxDialogs.
We use it for almost all dialogs in C::B and it works correctly there (as far as I know).

Rossifumi

  • Guest
Re: ScrollingDialog
« Reply #5 on: February 09, 2011, 03:39:20 pm »
yeah...but when i use SetMaxSize(-1,700);
i receive this error in runtime....

i suppose there is a conflict with the

FlexGridSizer->Fit(this);
FlexGridSizer->SetSizeHints(this);

???
« Last Edit: February 09, 2011, 03:41:56 pm by Rossifumi »

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: ScrollingDialog
« Reply #6 on: February 09, 2011, 05:26:00 pm »
It should work as for "real" wxDialogs.
We use it for almost all dialogs in C::B and it works correctly there (as far as I know).

Is this going to be redundant soon? http://docs.wxwidgets.org/trunk/overview_dialog.html#overview_dialog_autoscrolling

Rossifumi

  • Guest
Re: ScrollingDialog
« Reply #7 on: February 09, 2011, 05:51:14 pm »
thanks for reply...but i don't resolve my problem..
i explain better my situation:
i have a scrollingdialog that is ok...it scrolls...but it initial size is fit in weight, and is fullscreen in height...so, my question is:
"can i resize the scrollingdialog's heigth, so that its initial height is i.e. 700px?"

because it scrolls it isn't important that its height is max in the screen....

thanks for help.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: ScrollingDialog
« Reply #8 on: February 09, 2011, 06:07:08 pm »
yeah...but when i use SetMaxSize(-1,700);
i receive this error in runtime....

i suppose there is a conflict with the

FlexGridSizer->Fit(this);
FlexGridSizer->SetSizeHints(this);

???

Not sure why you need those calls on the sizer.


Have you tried something like:
Code
        dlg->Fit();
        wxSize s=GetSize();
        if(s.y>700) //shrink if fitted height is more than 700
            dlg->SetSize(s.x,700);


Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: ScrollingDialog
« Reply #9 on: February 09, 2011, 06:50:27 pm »
It should work as for "real" wxDialogs.
We use it for almost all dialogs in C::B and it works correctly there (as far as I know).

Is this going to be redundant soon? http://docs.wxwidgets.org/trunk/overview_dialog.html#overview_dialog_autoscrolling
We hopefully do not longer need it, if we can switch to wx2.9/3.0.

Rossifumi

  • Guest
Re: ScrollingDialog
« Reply #10 on: February 09, 2011, 06:57:41 pm »
I reach my aim with this call:

SetMaxSize(-1,700);

But, i receive the error message that i've posted...

The scrollingdialog is resized with this call...(but in runtime i've to click ignore to the error message...)where is the conflict??
« Last Edit: February 09, 2011, 08:19:05 pm by Rossifumi »

Rossifumi

  • Guest
Re: ScrollingDialog
« Reply #11 on: February 10, 2011, 03:00:09 pm »
suggestions???

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: ScrollingDialog
« Reply #12 on: February 10, 2011, 03:25:42 pm »
suggestions???

This question seems not to be a C::B related question, because it looks like a problem with wxWidgets (in this case it would violate our forum rules).
But it can also be a problem with wxScrollingDialog or wxSmith, so here comes my next question.

Where do you try to set SetMaxSize with two integers as parameters ?
wxDialog or wxTopLevelWindow (the base class) has no such function (as far as I know).
Or is it just a typo ?
Do you set it directly or through the wxSmith resources ?

Which version of wxWidgets do you use (seems to be a debug-build) ?
What happens if you just ignore the alert (if possible) ?

Could you provide a minimal sample project where this happens ?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: ScrollingDialog
« Reply #13 on: February 10, 2011, 03:31:20 pm »
I just tested it with a debug-build of wxWidgets and get the exact same error, if I set max size and min size for the dialog in wxSmith's resources and have min size greater than max size.
But that's exactly what the error message said, so I guess  it's not as simple as this.

Rossifumi

  • Guest
Re: ScrollingDialog
« Reply #14 on: February 10, 2011, 04:42:24 pm »
First of all...thank you for your help and your time... :D :D

Also...
- i tried to SetMaxSize,SetMinSize,SetSize in wxSmith resource(with integers of course)...

- and i tried in constructor of my scrollingdialog to call SetMaxSize(wxSize(-1,700)).

But i receive the same error.

I use a release-build of wxwidgets.

I can ignore the message...and the scrollingDialog is resized...
but i suppose that in definitive version of my .exe file i receive the alert too.
And that's my problem...because i can resize..(but i receive the alert)... :( :(
if you would i can send you my .h/.cpp files.