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 » ArrayCtrl, HeaderCtrl & GridCtrl » ArrayCtrl with ProgressIndicator [SOLVED]
ArrayCtrl with ProgressIndicator [SOLVED] [message #13991] Tue, 05 February 2008 16:08 Go to next message
fleximus is currently offline  fleximus
Messages: 3
Registered: December 2007
Location: Germany
Junior Member

Hi,


I did not manage to use the ProgressIndicator properly with the ArrayCtrl. I don't know how to set it to Percent() right.
I attached the code, please tell me what I did wrong?


Thank you!
/Flex
  • Attachment: MyWindow.cpp
    (Size: 0.56KB, Downloaded 346 times)

[Updated on: Tue, 05 February 2008 23:02]

Report message to a moderator

Re: ArrayCtrl with ProgressIndicator [message #13994 is a reply to message #13991] Tue, 05 February 2008 18:52 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
#include <CtrlLib/CtrlLib.h>

using namespace Upp;

class MyWindow : public TopWindow {
public:
	typedef Color CLASSNAME;
	MyWindow();
private:
	ArrayCtrl arrayctrl;
	Array<ProgressIndicator> ind;
};


MyWindow::MyWindow()
{
	arrayctrl.AddColumn("Text");
	arrayctrl.AddColumn("Option").Ctrls<Option>();
	arrayctrl.AddColumn("Progress");
	
	arrayctrl.Add("One", false);
	arrayctrl.SetCtrl(0, 2, ind.Add());
	arrayctrl.Add("Two", true);
	arrayctrl.SetCtrl(1, 2, ind.Add());
	
	ind[0].Set(25, 100);
	ind[1].Set(50, 100);
	
	Add(arrayctrl.SizePos());
	
	Sizeable().Zoomable();
	SetRect(100, 100, 500, 400);
}


GUI_APP_MAIN
{
	MyWindow().Title("Test App").Run();
}


Mirek
icon14.gif  Re: ArrayCtrl with ProgressIndicator [message #14003 is a reply to message #13994] Tue, 05 February 2008 22:56 Go to previous messageGo to next message
fleximus is currently offline  fleximus
Messages: 3
Registered: December 2007
Location: Germany
Junior Member

Hey Mirek!


That worked!
Without your hint I wouldn't have found it by myself. Thank you! Smile



/Flex
Re: ArrayCtrl with ProgressIndicator [message #14007 is a reply to message #14003] Wed, 06 February 2008 10:49 Go to previous messageGo to next message
bytefield is currently offline  bytefield
Messages: 210
Registered: December 2007
Experienced Member
Hi. Guess there is a little bug in both sources. CLASSNAME is defined as Color. It should be "typedef MyWindow CLASSNAME" (line 7). Smile

cdabbd745f1234c2751ee1f932d1dd75
Re: ArrayCtrl with ProgressIndicator [message #14055 is a reply to message #14007] Thu, 07 February 2008 23:18 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
bytefield wrote on Wed, 06 February 2008 04:49

Hi. Guess there is a little bug in both sources. CLASSNAME is defined as Color. It should be "typedef MyWindow CLASSNAME" (line 7). Smile


Correct. Was not a real problem for now, as there is not THISBACK..

Mirek
Previous Topic: ArrayCtrl: how to set label for embedded controls?
Next Topic: Copy from GridCtrl to Excel
Goto Forum:
  


Current Time: Fri Mar 29 12:05:11 CET 2024

Total time taken to generate the page: 0.01106 seconds