Width of node text?

Discuss everything related to ApPHP TreeMenu. Any questions related to the ApPHP TreeMenu developing or using should be posted to this forum.

Moderators: ne_moj, zewa, Milton, vadimako, ne_moj, zewa, Milton, vadimako

rfresh
Newbie
Newbie
Posts: 8
Joined: Jul 6th, '10, 16:30

Width of node text?

Postby rfresh » Jul 6th, '10, 16:37

Is there a setting to control the width of the text of a node? I have some fairly long text in my nodes and they are wrapping to the next line. How can I prevent the text wrapping on a node?

Milton
Senior
Senior
Posts: 31
Joined: Jan 14th, '10, 14:17

Re: Width of node text?

Postby Milton » Jul 7th, '10, 21:07

You can do it by changing width property for classes .tmTreecolumn and .tmContentscolumn in 'styles/common.css' file. By default nodes occupy 40% of window's width and content occupies 60%. Change this ratio to 70%-30% or something like that. Hope that helps.

Novice1
Newbie
Newbie
Posts: 3
Joined: Sep 23rd, '10, 20:58

Re: Width of node text?

Postby Novice1 » Sep 23rd, '10, 21:32

Hi !

Reading this reply (as I am dealing with the same problem as rfresh ) I wonder if I downloaded the right version (it's Version: 2.0.2).
Namely, I cannot find any classes .tmTreecolumn and .tmContentscolumn in 'styles/common.css' file. These classes are part of free version 1.0.1.
Can you please help me with the solution of this same problem when using the paid version ?

There is more: envoking javascript function by

Code: Select all

    window.onload = function(){
       document.getElementById("textXXX").onclick = function () {
           alert("Inside my heart is breaking \\ My make-up may be flaking \\ But my smile still stays on");
    }
    }

doesn't work. It seems like after creating tree menu document.getElementById function does not find the element - I have tried this function work on a very basic example:

Code: Select all

<script type="text/javascript"> 
window.onload = function(){

   
   document.getElementById('inputtext').onclick = function () {
       alert("Inside my heart is breaking \\ My make-up may be flaking \\ But my smile still stays on");
}
}
    </script>


Code: Select all

<form>
<input type='text' id='inputtext' size="20" />
<input type='button'  value='Form Checker' />
       </form> 


This works - until creating a menu tree. Then - it stops. It seems like javascript functions at
treemenu/js/script.js overwrite it or... ?

Thank you for any assistance,

Gregor

Milton
Senior
Senior
Posts: 31
Joined: Jan 14th, '10, 14:17

Re: Width of node text?

Postby Milton » Sep 25th, '10, 09:40

Novice1 wrote:Reading this reply (as I am dealing with the same problem as rfresh ) I wonder if I downloaded the right version (it's Version: 2.0.2).
Namely, I cannot find any classes .tmTreecolumn and .tmContentscolumn in 'styles/common.css' file. These classes are part of free version 1.0.1.
Can you please help me with the solution of this same problem when using the paid version ?

Yes, these classes are removed from the paid version. The simplest decision is the following:

Code: Select all

<div style='width:100px'>
<?
     $treeMenu->ShowTree();
?>
</div>

Milton
Senior
Senior
Posts: 31
Joined: Jan 14th, '10, 14:17

Re: Width of node text?

Postby Milton » Sep 25th, '10, 18:10

Novice1 wrote:There is more: envoking javascript function by

Code: Select all

    window.onload = function(){
       document.getElementById("textXXX").onclick = function () {
           alert("Inside my heart is breaking \\ My make-up may be flaking \\ But my smile still stays on");
    }
    }
doesn't work. It seems like after creating tree menu document.getElementById function does not find the element - I have tried this function work on a very basic example:

Try this:

Code: Select all

function myFunction(){
document.getElementById("textXXX").onclick=function(){
   alert("While the sun hangs in the sky and the desert has sand // While the waves crash into the sea and meet the land");
   }
}
if (window.addEventListener)
{
  window.addEventListener('load', myFunction, false);
}
else if (window.attachEvent)
{
  window.attachEvent('onload', myFunction);
}

Novice1
Newbie
Newbie
Posts: 3
Joined: Sep 23rd, '10, 20:58

Re: Width of node text? SOLVED

Postby Novice1 » Sep 27th, '10, 14:43

Hi Milton,

yes, this worked. Thank you for your assistance :)

Gregor

Segaboy
Newbie
Newbie
Posts: 1
Joined: Feb 19th, '15, 05:49

Re: Width of node text?

Postby Segaboy » Feb 19th, '15, 05:50

You can do it by changing width property for classes .tmTreecolumn and .tmContentscolumn in 'styles/common.css' file. By default nodes occupy 40% of window's width and content occupies 60%. Change this ratio to 70%-30% or something like that. Hope that helps.
We offer best quality Certkiller ccnp certification cost test papers and a+ tutorial 220-801 dumps materials. You can get our 100% guaranteed questions cnsu.edu to help you in passing the real exam.

JavierCoats
Newbie
Newbie
Posts: 1
Joined: Oct 13th, '17, 12:00
Contact:

Re: Width of node text?

Postby JavierCoats » Oct 13th, '17, 12:03

This works fine! Thanks for sharing your recommendation! I am pretty sure that everyone was abler to fix the issue.


Return to “ApPHP TreeMenu”