Jump to content

Padding treeview


Jaimie Vos
 Share

Recommended Posts

Knipsel.PNG.2694bc2aad2979a1483049a2d3fc2790.PNG

Is there a way to make this space smaller? I tried changing the padding but that didn't help.

This is my code:

	auto treeview = CreateTreeView(10, 10, sz.x / 4 - 20, sz.y - 20, ui->root);
	treeview->root->AddNode("image1.jpg");
	treeview->root->AddNode("image2.jpg");
	treeview->root->AddNode("image3.jpg");
	treeview->root->AddNode("image_that_has_a_long_name.jpg");
	treeview->root->AddNode("image_that_has_an_even_longer_name.jpg");

 

Link to comment
Share on other sites

The space is actually there because space is needed if a node has any children, for the little arrow on the left. Maybe you want a listbox instead?

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...