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 » "ScrollArea"...
icon1.gif  "ScrollArea"... [message #911] Wed, 08 February 2006 07:15 Go to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
I haven't found ScrollArea control in U++, so I started playing...
#include <CtrlLib/CtrlLib.h>

struct App : TopWindow {
	StaticRect          view, work;
	Array<Button>   obj;
	SliderCtrl          slider;
	Label               text;
//change count to change work area width 
static	int const count = 100;
static	int const elw = 40;
static	int const vw=500;
static  int	const ww = count*elw+50;
static  int const wh = 290;
		
	void Slider() {
		work.SetRectX(~slider,ww);
		text = "\1[C6*/@b " + AsString(~slider);
	}

	typedef App CLASSNAME;

	App() {
		view.SetRect(30,30,vw,300);
		view.Color(SBlack);
		work.SetRect(0,0,ww,wh);
		work.Color(SRed);
		view.Add(work);
		Add(view);
		for(int i=0;i<=count;i++){
		  obj.Add(); obj[i].SetRect(5+i*elw,20,30,20);
		  obj[i].SetLabel(AsString(i));
		  work.Add(obj[i]);
		}
		
		Add(slider.BottomPosZ(5, 30).HSizePos(300, 300));
		Add(text.LeftPos(5, 200).TopPos(5, 40));
		slider <<= THISBACK(Slider);
		slider.MinMax(-ww+5, vw-5);
		slider <<= 50;
		Slider();
		Sizeable().Zoomable();
	}
};

GUI_APP_MAIN
{
	App().Title("ScrollArea -v0.1").Run();
}

 

[Updated on: Fri, 26 May 2006 09:49]

Report message to a moderator

Re: "ScrollArea"... [message #3475 is a reply to message #911] Fri, 26 May 2006 09:53 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
You can download my new version of ScrollArea. Nothing special but might be sometimes useful...
Unzip "here" into your packages dir.

Edit: this version with scrollbars.

[Updated on: Fri, 26 May 2006 12:20]

Report message to a moderator

Re: "ScrollArea"... [message #3904 is a reply to message #3475] Sat, 08 July 2006 00:49 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
fudadmin wrote on Fri, 26 May 2006 09:53

You can download my new version of ScrollArea. Nothing special but might be sometimes useful...
Unzip "here" into your packages dir.

Edit: this version with scrollbars.

Hi Aris,

I'm using your scrollarea. It is very useful in this moment because I'm trying to simulate a sort of arrayctrl where each row contains different widgets that can be manipulated easily.
Because I do not need a horizontal scroll I wonder if can be removed the horizontal bar.

Luigi
Re: "ScrollArea"... [message #3905 is a reply to message #3904] Sat, 08 July 2006 01:47 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
ScrollArea::ScrollArea()
{
	SetWorkSize(Size(1000,1000));
	AddFrame(sc);
	Add(work);

	sc.HideX();  //
//	sc.HideY();  // ADDED uncomment to hide...
	
	sc.WhenScroll=THISBACK(Scroll);
//	AddFrame(ThinOutsetFrame());
	AddFrame(ThinInsetFrame());
}


OK?
Re: "ScrollArea"... [message #3906 is a reply to message #3905] Sat, 08 July 2006 08:35 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
fudadmin wrote on Sat, 08 July 2006 01:47

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

	sc.HideX();  //
//	sc.HideY();  // ADDED uncomment to hide...
	
	sc.WhenScroll=THISBACK(Scroll);
//	AddFrame(ThinOutsetFrame());
	AddFrame(ThinInsetFrame());
}


OK?


Yes, it is OK.
Thank you
Re: "ScrollArea"... [message #3931 is a reply to message #3904] Mon, 10 July 2006 00:03 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
forlano wrote on Sat, 08 July 2006 00:49

Nothing special but might be sometimes useful...


Here http://www.vegachess.com/en/vega5rr.htm , at the middle of the page, you can see your scroll area in action Cool

Luigi
Re: "ScrollArea"... [message #3932 is a reply to message #3931] Mon, 10 July 2006 00:06 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
forlano wrote on Sun, 09 July 2006 23:03



Here http://www.vegachess.com/en/vega5rr.htm , at the middle of the page, you can see your scroll area in action Cool

Luigi


Which one?
Re: "ScrollArea"... [message #3933 is a reply to message #3932] Mon, 10 July 2006 00:24 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
fudadmin wrote on Mon, 10 July 2006 00:06

forlano wrote on Sun, 09 July 2006 23:03



Here http://www.vegachess.com/en/vega5rr.htm , at the middle of the page, you can see your scroll area in action Cool

Luigi


Which one?


It is the window "Modify Colors". In the worse situation I needed 500 pair of buttons and and relative labels and icons (they are simple icon in a label and not option image button). Perhaps the arrayctrl is enough to do it... knowing how to use it... but I found easier to attach them to the scrolling area. Each row is widget class.

[Updated on: Mon, 10 July 2006 00:26]

Report message to a moderator

Re: "ScrollArea"... [message #3934 is a reply to message #3933] Mon, 10 July 2006 00:45 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
forlano wrote on Sun, 09 July 2006 23:24



It is the window "Modify Colors". In the worse situation I needed 500 pair of buttons and and relative labels and icons (they are simple icon in a label and not option image button). Perhaps the arrayctrl is enough to do it... knowing how to use it... but I found easier to attach them to the scrolling area. Each row is widget class.


Looks nice!
Re: "ScrollArea"... [message #10968 is a reply to message #911] Wed, 08 August 2007 09:52 Go to previous messageGo to next message
benoitc is currently offline  benoitc
Messages: 17
Registered: July 2007
Location: Nice (France)
Promising Member
Hi,

I cannot get the zip file, I get an empty file when I tried to download it.

Can someone repost the file?

Thanks in advance,
Benoit
Re: "ScrollArea"... [message #10969 is a reply to message #10968] Wed, 08 August 2007 11:16 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
benoitc wrote on Wed, 08 August 2007 08:52

Hi,

I cannot get the zip file, I get an empty file when I tried to download it.

Can someone repost the file?

Thanks in advance,
Benoit

Edit:
P.S. I'm just not very sure if they are the same versions. But the idea is very simple.

[Updated on: Wed, 08 August 2007 11:20]

Report message to a moderator

Re: "ScrollArea"... [message #10970 is a reply to message #10969] Wed, 08 August 2007 12:25 Go to previous message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
using namespace Upp;
is missing.

Matthias
Previous Topic: How to use droplist and switch
Next Topic: What way is best to implement Callback for GotFocus/LostFocus?
Goto Forum:
  


Current Time: Fri Mar 29 15:19:01 CET 2024

Total time taken to generate the page: 0.01383 seconds