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 » Slider&ProgressIndicator » ProgressIndicator in StatusBar
Re: ProgressIndicator in StatusBar [message #10060 is a reply to message #10057] Mon, 18 June 2007 19:10 Go to previous messageGo to previous message
mezise is currently offline  mezise
Messages: 54
Registered: April 2006
Member
unodgs wrote on Mon, 18 June 2007 15:43

StatusBar sb;
ProgressIndicator pi;
sb.Add(pi.LeftPos(5, 200).HSizePos());

In U++ you can add any control to any conrol using Ctrl interface.

This code does not work for me too. It would be great to be feasible this way.

Working solutions are:
1. InfoCtrl with its own Display
2. and simpler use of ProgressInfo:
progressInfo.Info(status);


Slightly modified reference/SliderProgressInd using ProgressInfo:
#include <CtrlLib/CtrlLib.h>

using namespace Upp;

struct App : TopWindow {
	ProgressIndicator progress;
	SliderCtrl        slider;
	Label             text;
	StatusBar         status; // --- added ---
	ProgressInfo      progressInfo; // --- added ---

	void Slider() {
		progress.Set(~slider, 100);
		progressInfo.Set(~slider, 100); // --- added ---
		text = "\1[C6*/@b " + AsString(~slider);
	}

	typedef App CLASSNAME;

	App() {
		Add(slider.BottomPosZ(5, 30).HSizePos(10, 10));
		Add(progress.VSizePos(10, 40).HCenterPos(40));
		
		AddFrame(status); // --- added ---
		//status.Add(progress); // --- added --- DOES NOT WORK!
		progressInfo.Info(status); // --- added --- WORKS!
		
		Add(text.LeftPos(5, 200).TopPos(5, 40));
		slider <<= THISBACK(Slider);
		slider.Range(100);
		slider <<= 50;
		Slider();
		Sizeable().Zoomable();
	}
};

GUI_APP_MAIN
{
	App().Run();
}



Michal

[Updated on: Mon, 18 June 2007 19:11]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Use slider from layout designer?
Next Topic: Please, add SetColor function to ProgressIndicator
Goto Forum:
  


Current Time: Mon Aug 25 00:46:03 CEST 2025

Total time taken to generate the page: 0.05808 seconds