Hypertext in treeview

Discuss any general programming issues here

Hypertext in treeview

Postby delbourg » Sun Aug 27, 2017 2:25 am

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?
delbourg
 
Posts: 21
Joined: Tue Jun 20, 2017 6:07 am
Location: Tasmania

Re: Hypertext in treeview

Postby SamuraiCrow » Sun Aug 27, 2017 3:59 am

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.
SamuraiCrow
 
Posts: 101
Joined: Fri May 15, 2015 5:15 pm
Location: Ft. Collins, Colorado USA

Re: Hypertext in treeview

Postby Bugala » Sun Aug 27, 2017 9:37 am

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"
Bugala
 
Posts: 645
Joined: Sun Feb 14, 2010 8:11 pm

Re: Hypertext in treeview

Postby delbourg » Mon Aug 28, 2017 9:49 am

Thanks for the suggestions. I will try to see if invisible boxes within a treeview work.
delbourg
 
Posts: 21
Joined: Tue Jun 20, 2017 6:07 am
Location: Tasmania

Re: Hypertext in treeview

Postby airsoftsoftwair » Tue Aug 29, 2017 5:40 pm

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.
User avatar
airsoftsoftwair
 
Posts: 2233
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: Hypertext in treeview

Postby delbourg » Thu Aug 31, 2017 1:57 am

Thank you airsoft. The execute command is just what I needed. It is so simple and solves all my problems.
delbourg
 
Posts: 21
Joined: Tue Jun 20, 2017 6:07 am
Location: Tasmania

Re: Hypertext in treeview

Postby delbourg » Thu Aug 31, 2017 5:43 am

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?
delbourg
 
Posts: 21
Joined: Tue Jun 20, 2017 6:07 am
Location: Tasmania

Re: Hypertext in treeview

Postby airsoftsoftwair » Thu Aug 31, 2017 10:00 pm

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>
User avatar
airsoftsoftwair
 
Posts: 2233
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: Hypertext in treeview

Postby delbourg » Fri Sep 01, 2017 1:57 am

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.
delbourg
 
Posts: 21
Joined: Tue Jun 20, 2017 6:07 am
Location: Tasmania

Re: Hypertext in treeview

Postby Bugala » Fri Sep 01, 2017 6:54 pm

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.
Bugala
 
Posts: 645
Joined: Sun Feb 14, 2010 8:11 pm

Next

Return to General programming

Who is online

Users browsing this forum: No registered users and 5 guests