treeview - more then one icon and more text

BlitzMax Forums/MaxGUI Module/treeview - more then one icon and more text

Tempus(Posted 2008) [#1]
hi,
i´m new to blitzmax and maxgui.
i want to create a treeview with more than one icon for each node. is this with maxgui possible?
something like


and another question is it possible to have an additional text to each node to the right? like



SebHoll(Posted 2008) [#2]
i want to create a treeview with more then one icon for each node. is this with maxgui possible?

and another question is it possible to have an additional text to each node to the right? like

Put simply, no, although you may get somewhere if you hack the MaxGUI modules apart and override the window drawing messages for the nodes.

I've never seen this idea before in any other application - I think the expected behaviour is to use tooltips to display additional relevant text for the node (ahem, I know there aren't any for treeviews at the moment) or a separate panel beside the treeview which displays any properties of the currently selected node.


Tempus(Posted 2008) [#3]
thanks for the information

another question about Listboxes

is it possible to format Listboxes

1. some lines are bold, italic, different colour or differnt font?

2. to put some TABs between the text
example:

Line 1 Text ---------------TAB--->Text2
Line 2 longer Text---------TAB--->Text2

3. to make the icons longer. for example not 12*12 Pixels but 24*12 Pixel.


SebHoll(Posted 2008) [#4]
:-P

1. No
2. Just tried it now, and inserting a "~t" in between two strings doesn't make any differnce, so No.
3. No

You're not having much luck here are you... :-(

I think what you probably want is a multi-column listbox - one of the most frequently requested gadgets from MaxGUI users.

My only suggestion would be to perhaps look at some of the community contributed hacks (if you are only wanting to compile on Windows):

http://www.blitzbasic.com/Community/posts.php?topic=53343



Otherwise, you might want to consider looking at Brucey's wxWidgets GUI library wrapper: wxMax.


rs22(Posted 2008) [#5]
If it interests you, wxWidgets can do some of what you mention (changing the colour of lines, for example), but it's a bit trickier to use than MaxGUI, and the BlitzMax port isn't finished at present.

Since wxWidgets can do some of this, I assume you would be able to do it with the Windows API. Perhaps taking a look at the source of the wxWidgets components might put you in the right direction?

You could fake tabs, couldn't you?


jsp(Posted 2008) [#6]
As you heard already it's not possible to do it like you wanted. The question may is, does it need to be like that? If not, you could may arrange it differently which could be still ok for you or the user.
When looking at both examples, the first idea which came up, is to create for the projects in the list a subnode. This subnode can have again an icon (your second one) and as text perhaps your numbers (those after the tabs) and it belongs directly to each project in the tree structure.
Those subnodes can be automatically expanded by your program, to stay always open. Or you can do so by a single click on a treeview item manually on demand.
Don't know how important the extra info is? Do you need it visible all the time, or is it just a minor thing? As the treeview can detect a right click on a node, you could popup a small menu with icon and text (it does not need to do anything when selected) like a context menu.
Just some ideas...


Tempus(Posted 2008) [#7]
again thanks for your help.
i have a workaround for my problem.
i create two versions for each icon. primary usage of the icon is to tell the user the colour of drawn lines on a canvas. secondary usage is to tell the user that the lines are visible or not. so i create for each colour a visible and an invisible icon.

compared to my next problem this is trivial....

triangulating 2d-polygons.

it seems nobody has made this in blitzmax.
but this is the wrong thread to discuss this. i´m opening a new thread in "BlitzMax Programming"

thanks for your effort