Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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: Tue May 14 05:07:15 CEST 2024

Total time taken to generate the page: 0.03091 seconds