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 |
|
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
|
|
|
|
|
Understanding Frames
By: brianE on Sat, 01 July 2006 00:09
|
|
|
Re: Understanding Frames
By: forlano on Sat, 01 July 2006 10:20
|
|
|
Re: Understanding Frames
|
|
|
Re: Understanding Frames
By: Werner on Sat, 01 July 2006 22:34
|
|
|
Re: Understanding Frames
|
|
|
Re: Understanding Frames
By: Werner on Sun, 02 July 2006 13:53
|
|
|
Re: Understanding Frames
By: brianE on Sun, 02 July 2006 14:45
|
|
|
Re: Understanding Frames
By: mirek on Sun, 09 July 2006 15:53
|
|
|
Re: Understanding Frames
By: brianE on Sun, 02 July 2006 01:06
|
|
|
Re: Understanding Frames
By: forlano on Sun, 02 July 2006 11:18
|
|
|
Re: Understanding Frames
By: Werner on Sun, 02 July 2006 13:13
|
|
|
Re: Understanding Frames
By: brianE on Sun, 02 July 2006 14:08
|
|
|
Re: Understanding Frames
By: mirek on Sun, 09 July 2006 15:58
|
Goto Forum:
Current Time: Sat May 18 05:11:13 CEST 2024
Total time taken to generate the page: 0.02200 seconds
|