Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Problem with ScrollContainer...
|
|
Re: Problem with ScrollContainer... [message #22435 is a reply to message #22429] |
Wed, 15 July 2009 14:05   |
mrjt
Messages: 705 Registered: March 2007 Location: London
|
Contributor |
|
|
Try the attached package.
In this example I haven't set max size. For layouts as in the example you would proabbly just want SetMaxSize(GetMaxSize())
One mistake you'd made was doing layout in the Paint routine. This should generally be avoided.
Also when Painting all drawing coords are already take any frames into account, so you don't have to worry about the view yourself (I made the same mistake when I started). Just do:
Rect r = GetSize()
// Draw background
w.DrawRect(r);
// Draw Text in top-left corner
w.DrawText(0, 0, "TEXT");
Hope that helps.
[Updated on: Wed, 15 July 2009 14:10] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Sat Apr 26 14:18:13 CEST 2025
Total time taken to generate the page: 0.02957 seconds
|