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 » [bug] ArrayCtrl removing all rows upon removing only last row
[bug] ArrayCtrl removing all rows upon removing only last row [message #40393] Mon, 29 July 2013 20:51 Go to previous message
bushman is currently offline  bushman
Messages: 134
Registered: February 2009
Experienced Member
I get ALL ArrayCtrl rows removed if I try to remove ONLY the LAST row, while trying the simple procedure below:

1. Create an ArrayCtrl and populate it with rows;
2. Select LAST row;
3. Remove row via ArrayCtrl::RemoveSelection();

test case for reference:
#include <CtrlLib/CtrlLib.h>

using namespace Upp;

class App : public TopWindow
{
	typedef App CLASSNAME;
	ArrayCtrl 	array;
	Button		btn;
	
//this will remove all ArrayCtrl rows if last row selected:
	void RemoveArrSel() { array.RemoveSelection(); }

	public:
	App() {		
		array.AddColumn("some data");
		for(int i = 1; i < 51; i++)
			array.Add(FormatIntRoman(i, true));
		
		SetRect(0, 0, 300, 300);
		Add(array.HSizePos().TopPos(0, 170));
		
		btn.SetLabel("remove selected");
		Add(btn.HCenterPos(100).BottomPos(4));
		btn.WhenAction = THISBACK(RemoveArrSel);
	}
};

GUI_APP_MAIN
{
	App().Run();
}

It works fine for all other rows, except for the last one.

Running IDE 6158 on Windows 7.

tks!
 
Read Message
Read Message
Read Message
Previous Topic: Hand cursor over ArrayCtrl Column
Next Topic: [SMALL BUG] HeaderCtrl - one pixel width white line - artifact
Goto Forum:
  


Current Time: Sat Apr 27 06:13:23 CEST 2024

Total time taken to generate the page: 1.07947 seconds