Home » U++ Library support » U++ Widgets - General questions or Mixed problems » "ScrollArea"...
"ScrollArea"... [message #911] |
Wed, 08 February 2006 07:15 |
|
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 |
|
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 #3933 is a reply to message #3932] |
Mon, 10 July 2006 00:24 |
|
forlano
Messages: 1186 Registered: March 2006 Location: Italy
|
Senior Contributor |
|
|
fudadmin wrote on Mon, 10 July 2006 00:06 |
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 #10969 is a reply to message #10968] |
Wed, 08 August 2007 11:16 |
|
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
|
|
|
|
Goto Forum:
Current Time: Thu May 23 16:54:39 CEST 2024
Total time taken to generate the page: 0.01258 seconds
|