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 » Extra libraries, Code snippets, applications etc. » U++ users applications in progress and useful code snippets, including reference examples! » Slider and "Dynamic rectangle" example
Slider and "Dynamic rectangle" example [message #910] Wed, 08 February 2006 05:27 Go to next message
fudadmin is currently offline  fudadmin
Messages: 1298
Registered: November 2005
Location: London, UK
Senior Contributor
Administrator
#define MY_TITLE "Dynamic Rectangle"
#include <CtrlLib/CtrlLib.h>
//Based on SliderProgressIndicator example
//dynamically changes StaticRect coords

struct App : TopWindow {
	StaticRect dynrc;
	SliderCtrl        slider;
	Label             text;

	void Slider() {
//here is the main "dynamism"...
		dynrc.SetRectX(50,~slider);
		text = "\1[C6*/@b " + AsString(~slider);
	}

	typedef App CLASSNAME;

	App() {
		Add(slider.BottomPosZ(5, 30).HSizePos(300, 300));
		
		dynrc.Color(SRed);
		Add(dynrc.VSizePos(10, 40).HCenterPos(40));
		
		Add(text.LeftPos(5, 200).TopPos(5, 40));
		slider <<= THISBACK(Slider);
		slider.Range(700);
		slider <<= 50;
		Slider();
		Sizeable().Zoomable();
	}
};

GUI_APP_MAIN
{
	App().Title(MY_TITLE).Run();
}

Re: Slider and "Dynamic rectangle" example [message #1904 is a reply to message #910] Sun, 26 March 2006 00:53 Go to previous messageGo to next message
barpas is currently offline  barpas
Messages: 13
Registered: March 2006
Location: Poland
Promising Member
is it possibile to put slider verticaly???
Re: Slider and "Dynamic rectangle" example [message #1907 is a reply to message #910] Sun, 26 March 2006 11:52 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11991
Registered: November 2005
Ultimate Member
Adopted as reference/Slider. Thanks.

Mirek
Re: Slider and "Dynamic rectangle" example [message #1909 is a reply to message #1907] Sun, 26 March 2006 15:10 Go to previous messageGo to next message
barpas is currently offline  barpas
Messages: 13
Registered: March 2006
Location: Poland
Promising Member
i don't uderstand You or You dont understand me...

i cant find application reference/slider Sad
i was looking in my distrybution(602) and on the web upp site...

in aplication reference/SliderProgressInd is slider like this:

-------------|--------------

i need slider like this:

|
|
|
|
-
|
|
|
|
|

i find that Fudadmin asking sometime abaut vertical slider but anybady answered him ... (ups Hi asked today)

i tray to do it myself and i have some sukcess but i used Slider form scrollbar.h (NOT SlidterCtrl) besides it not look nice Sad

[Updated on: Sun, 26 March 2006 15:24]

Report message to a moderator

Re: Slider and "Dynamic rectangle" example [message #1911 is a reply to message #1909] Sun, 26 March 2006 18:15 Go to previous message
mirek is currently offline  mirek
Messages: 11991
Registered: November 2005
Ultimate Member
Ah, sorry, actually, my reply was more or less directed to fudadmin as acknowledge that his example is now (I mean today Smile adapted to reference...

Mirek
Previous Topic: ExpressPane
Next Topic: Mouse over button example -"catch me if you can..."
Goto Forum:
  


Current Time: Sun Aug 18 20:05:24 CEST 2019

Total time taken to generate the page: 0.00699 seconds