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 » Understanding Frames
Re: Understanding Frames [message #3917 is a reply to message #3863] Sun, 09 July 2006 15:53 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13980
Registered: November 2005
Ultimate Member
OK, here is a simple way how to undestand frames:

Frames emerged to solve the simple problem: You have some widget that has scroll-bar(s). Now the question is how to organize all things.

Without frames, you would need to use some sort of composition: One "parent" Ctrl, which would provide some sort of static edge, scroll-bar widget and "view" widget.

Unfortunate thing about this arrangement is that "view" widget becomes "contained" inside parent Ctrl, but in dialog you need to work with parent Ctrl. So it is e.g. difficult to create subclass of such view.

Solution: scroll-bar is "frame". You can freely add frames to Ctrl and the important thing about them is that they "reduce" the view area. With this concept, you can even make that static edge a frame. Moreover, you can alter existing widgets by adding further frames (e.g., you can add HeaderCtrl to LineEdit etc...)

There are things to remember

- frames do not have to be widgets, but can be. E.g. ScrollBar is derived both from Ctrl and Frame. Means you can add it to widget either as regular child, or using AddFrame.

- CtrlFrame interface is designed in a way that makes possible to use single static frame instance for multiple widget.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Mapping button to CALLBACK
Next Topic: scrolling without Frame and wrapping Ctrl?
Goto Forum:
  


Current Time: Sat May 18 05:11:13 CEST 2024

Total time taken to generate the page: 0.02200 seconds