Page 1 of 2

Hypertext in treeview

Posted: Sun Aug 27, 2017 2:25 am
by delbourg
I am relatively new to Hollywood.

I have created a nice treeview list of my famly tree.(it is not a web page.)

Is there a way whereby if I click on an item on my tree I can call up a picture or pdf file say?

Re: Hypertext in treeview

Posted: Sun Aug 27, 2017 3:59 am
by SamuraiCrow
You could try using buttons instead of links. They should be nestable in the same way links are.

However, there might be trouble pulling up a PDF unless you use an external program.

Re: Hypertext in treeview

Posted: Sun Aug 27, 2017 9:37 am
by Bugala
Wihtout knowing how you ahve done that it is difficult to say, but basically as SamuraiCrow said.

You could for example draw a rectangle box layer and then on top of those boxes write each of your entries. Then you could make that rectangle become a button, and that button would work simply work so that when you click it, it woudl show the picture.

Of course you could also make buttons using invisible boxes, in which case you dont need that rectangle box at all, this is called "simplebutton" where you just choose the rectanble area. Downside of this however is that it is more difficult to see if one of the buttons is misplaced. By using those rectangle boxes, you can right away see if one of the boxes is not at correct location.

edit: forgot to mention. Check documentation from part "MakeButton"

Re: Hypertext in treeview

Posted: Mon Aug 28, 2017 9:49 am
by delbourg
Thanks for the suggestions. I will try to see if invisible boxes within a treeview work.

Re: Hypertext in treeview

Posted: Tue Aug 29, 2017 5:40 pm
by airsoftsoftwair
Note that if you're using RapaGUI, MakeButton() won't work. On non-Amiga systems you can just use the following code to show a picture:

Code: Select all

Execute("picture.jpg")
This will open "picture.jpg" with the default viewer for JPG but it will only work on Windows, Mac OS, and Linux.

Re: Hypertext in treeview

Posted: Thu Aug 31, 2017 1:57 am
by delbourg
Thank you airsoft. The execute command is just what I needed. It is so simple and solves all my problems.

Re: Hypertext in treeview

Posted: Thu Aug 31, 2017 5:43 am
by delbourg
I have failed to get hrules in treeview.

What I did was to enter. Moai.set("tv", "HRules", true). In my hollywood hws script. What am I doing wrong?

Re: Hypertext in treeview

Posted: Thu Aug 31, 2017 10:00 pm
by airsoftsoftwair
Treeview.HRules has an applicability of "I" which means that it can only be set at initialization time. So you have to set it in your XML directly, e.g. like this:

Code: Select all

<treeview .... hrules="true">
   ...
</treeview>

Re: Hypertext in treeview

Posted: Fri Sep 01, 2017 1:57 am
by delbourg
Thank you for the instructions. As you see I am gradually learning...

Meanwhile I have found it difficult to identify or extract an item from a treeview. I found the instruction for getentry a bit confusing but that is probably my fault.

Re: Hypertext in treeview

Posted: Fri Sep 01, 2017 6:54 pm
by Bugala
Just wanting to add to my original comment about using buttons, that I actually didnt understand treeview was some sort of plugin, i thought you were simply meaning that you made your family history in tree like view. Hence my comment about buttons might not be relevant at all, as i have no clue what this treeview thing is.