U++ framework
Do not panic. Ask here before giving up.

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 Go to previous messageGo to previous message
mrjt is currently offline  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

 
Read Message icon9.gif
Read Message
Read Message
Read Message
Previous Topic: how to simulate text links?
Next Topic: strange looking window
Goto Forum:
  


Current Time: Mon Oct 05 19:23:39 GMT+2 2026

Total time taken to generate the page: 0.00782 seconds