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 » TreeCtrl » Problem displaying labels under ubuntu 7.10
Problem displaying labels under ubuntu 7.10 [message #15088] Sat, 29 March 2008 17:05 Go to previous message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Thanks for the 2008.2 beta for linux Smile

My code compiles and runs fine apart from a few display problems. I use a drag and drop option tree and whilst I can see the option control and the image, the text gets hidden behind the option and is limited to the client space of the option control.

I have reproduced the problem by adapting the DND tree control example

EDIT: this code runs perfectly under Windows XP, just not under ubuntu 7.10

#include "CtrlLib/CtrlLib.h"

using namespace Upp;

struct App : TopWindow {
	TreeCtrl   tree;

	Option options[10000];

	typedef App CLASSNAME;

	void DropInsert(int parent, int ii, PasteClip& d)
	{
		tree.AdjustAction(parent, d);
		if(AcceptInternal<TreeCtrl>(d, "mytreedrag")) {
			tree.InsertDrop(parent, ii, d);
			tree.SetFocus();
			return;
		}
		if(AcceptText(d)) {
			tree.SetCursor(tree.Insert(parent, ii, Image(), GetString(d)));
			tree.SetFocus();
			return;
		}
	}

	void Drag()
	{
		if(tree.DoDragAndDrop(InternalClip(tree, "mytreedrag"),
		                       tree.GetDragSample()) == DND_MOVE)
			tree.RemoveSelection();
	}

	App() {
		Add(tree.SizePos());
		Vector<int> parent, parent2;
		parent.Add(0);
		tree.SetRoot(Image(), "The Tree");
		for(int i = 1; i < 10000; i++) 
		{
			TreeCtrl::Node node(CtrlImg::File(),options[i],20);
			node.Set(FormatIntRoman(i, true));
			parent.Add(tree.Add(parent[rand() % parent.GetCount()],node));
		
//			parent.Add(tree.Add(parent[rand() % parent.GetCount()], Image(),
//			            FormatIntRoman(i, true)));
			if((rand() & 3) == 0)
				tree.Open(parent.Top());
		}
		tree.Open(0);
		tree.WhenDropInsert = THISBACK(DropInsert);
		tree.WhenDrag = THISBACK(Drag);
		tree.MultiSelect();
		Sizeable();
	}
};

GUI_APP_MAIN
{
	App().Run();
}

[Updated on: Sun, 30 March 2008 03:02]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: problem in Refreshing at end of tree
Next Topic: Cursor doesn't refresh
Goto Forum:
  


Current Time: Mon May 06 01:01:55 CEST 2024

Total time taken to generate the page: 0.03963 seconds