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 » scrolling without Frame and wrapping Ctrl?
scrolling without Frame and wrapping Ctrl? [message #3954] Tue, 11 July 2006 15:02 Go to next message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
I want something like this:
----------
|        |
|---     |
|  |     |
|---     |
|        |
----------

and the inner rectangle should be scrollable, so i need to set the rectangle of it using SetRect(), this means i need either a Frame around it or a wrapping Ctrl, or is there another possibility to do this? eg a SetCtrlPositionSize() or anything similar.

thanks,
Bas

[Updated on: Tue, 11 July 2006 15:03]

Report message to a moderator

Re: scrolling without Frame and wrapping Ctrl? [message #3955 is a reply to message #3954] Tue, 11 July 2006 15:18 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
1. Have you tried my ScrollAreas:
http://www.arilect.com/upp/forum/index.php?t=msg&th=260& amp;start=0&

2. What are you going to put into non-scrollable area around?
Re: scrolling without Frame and wrapping Ctrl? [message #3957 is a reply to message #3955] Tue, 11 July 2006 15:28 Go to previous messageGo to next message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
Hi, fudamin,

I want to be able to put different Ctrls inside the non scroleable Area.

Yes, I had a look at your scrolleable area, but I dont want Scrollbars and with Scrollbars you put a Frame around the scrolling area.

thanks for your answer, Bas
Re: scrolling without Frame and wrapping Ctrl? [message #3960 is a reply to message #3957] Tue, 11 July 2006 17:54 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
fallingdutch wrote on Tue, 11 July 2006 14:28

Hi, fudamin,

I want to be able to put different Ctrls inside the non scroleable Area.

Yes, I had a look at your scrolleable area, but I dont want Scrollbars and with Scrollbars you put a Frame around the scrolling area.

thanks for your answer, Bas


ScrollArea::ScrollArea()
{
	SetWorkSize(Size(1000,1000));
	AddFrame(sc);
	Add(work);

	sc.HideX();  //
//	sc.HideY();  // ADDED uncomment to hide scrollbars...
	
	sc.WhenScroll=THISBACK(Scroll);
//	AddFrame(ThinOutsetFrame());
//	AddFrame(ThinInsetFrame());  //comment if you don't need
}

Use HideX and HideY accordingly if you don't need scrollbars.
You can remove my added frames by commenting them at initialization and , as I remember, it is possible to remove other frames with RemoveFrame(...).
But what is behind the idea: scrollable area without the scrollbars?
Re: scrolling without Frame and wrapping Ctrl? [message #3964 is a reply to message #3954] Tue, 11 July 2006 19:06 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
fallingdutch wrote on Tue, 11 July 2006 09:02

I want something like this:
----------
|        |
|---     |
|  |     |
|---     |
|        |
----------

and the inner rectangle should be scrollable, so i need to set the rectangle of it using SetRect(), this means i need either a Frame around it or a wrapping Ctrl, or is there another possibility to do this? eg a SetCtrlPositionSize() or anything similar.

thanks,
Bas


Sorry, but this is way too vague description... Any real live examples or something more specific?

BTW, there is nothing bad about wrapping Ctrl in most cases... U++ Ctrls are very light...

Mirek
Re: scrolling without Frame and wrapping Ctrl? [message #3965 is a reply to message #3964] Tue, 11 July 2006 19:33 Go to previous messageGo to next message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
thanks for your answers,

I now have wrapped a ctr with another ctrl.

I wanted a scrolleable Area that i can place whereever i want and whatever size i need without scrollbars, because i have another ctrl with scrollbars and want this one to scroll with the other ctrl, that has scrollbars.

Bas
Re: scrolling without Frame and wrapping Ctrl? [message #3968 is a reply to message #3965] Tue, 11 July 2006 20:40 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
I see. In this case IMO the best solution is indeed composition of helper Ctrls.

You can e.g. use 2 helper Ctrls to achieve what you desire:

- use one to "clip" that smaller scrollable area
- then use other to place actual Ctrls on. Make this child of "clipping" Ctrl and make it eventually BIGGER than is "clipper".
- then scroll simply by using "SetRect" to the child Ctrl.

Mirek
Re: scrolling without Frame and wrapping Ctrl? [message #3969 is a reply to message #3968] Tue, 11 July 2006 21:18 Go to previous message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
thanks Mirek,

that is indeed exactly what I thought and also did ... I feel approved Wink
Previous Topic: Understanding Frames
Next Topic: Filling TabCtrl from Layout
Goto Forum:
  


Current Time: Fri Mar 29 08:30:19 CET 2024

Total time taken to generate the page: 0.01509 seconds