Announcement

Collapse
No announcement yet.

Nortree probs with 800x600

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Nortree probs with 800x600

    Hi all,
    I'm using Nortree which works fine as my resolution is 1024x768.
    I just tried it with my resolution at 800x600 and holy mamma!! I can't see alot of my page. What is the best Nortree setup to use so all site viewers regardless of resolution can view the site correctly? It's a pretty big menu and I'm worried if i make the fonts smaller in Nortree the people with 1024x768 won't be able to read the menu.
    Any help as usual is greatly appreciated.

    Cheers,

    Jacy

    www.jacyscomputers.com.au
    Jacys Computer Supplies
    Web: http://www.jacyscomputers.com.au
    email: sales@jacyscomputers.com.au

    #2
    There's no easy fix other than re-arranging the menus so that they're not too long or, as you said, reducing the cell height.

    However the mouse scroll wheel (if you've got one) and the arrow keys still work while in the menu.

    Also the sub menus do auto re-locate to try to fit as much as possible onto the screen.

    It might be possible to modify the menu_com.js script to automatically scroll the page (or the menu) if on the last/first visible item and the list was longer than the visible window but I'm not going to do this myself. Anyone who wants do do this is welcome as the full source is provided. Also you could try contacting Ger (in Holland - his address is in the code) who wrote the menu script bit (I only did the Actinic interface) and see if he'd like to do this.

    Norman
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      A sudden thought popped into my head. The cell height is created by nortree_menu_create.js (look for LineHeight) so it should be possible to automatically reduce this if the menu length (variable i) times the line height was too small (compare with window.navigator.innerWidth). You could also specify a different FontSize as well.

      This isn't too complex JavaScript so you may be able to manage it yourself.

      Norman
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Thanks Norman,
        I'll have a look.

        Cheers,

        Jacy
        Jacys Computer Supplies
        Web: http://www.jacyscomputers.com.au
        email: sales@jacyscomputers.com.au

        Comment


          #5
          I had some spare time and came up with this:-

          Code:
          Making NorTree auto size tables for low resolution screens.
          
          Edit nortree_menu_create.js in your Site folder(s).
          
          look for the first occurrence of  ThisLevel++
          
          add the following code immediately below it.
          
          
          
           var ExpYes=navigator.userAgent.toLowerCase().indexOf('msie')!=-1?1:0;
           var WinHeight = ExpYes?document.body.clientHeight:window.innerHeight;
           var NumItems = pItem.length;
           var MenuHeight = NumItems * LineHeight;
           var BorderHeight=BorderBtwnElmnts?BorderWidth * NumItems:0;
           if ((MenuHeight + BorderHeight) > WinHeight)
              {
              LineHeight = Math.floor((WinHeight - BorderHeight) / NumItems);	// auto size
              if ( LineHeight < MinHeight ) LineHeight = MinHeight;		// if too small give up and set a minimum height
              }
          
          
          Save the patched nortree_menu_create.js.
          
          Run NorTree.exe (the configuration program)
          
          In  Advanced / ExtraCode add the following line (change the value 10 to suit your site).
          
          
          var MinHeight = 10;	// set the minimum height you want to auto size to
          
          
          Make sure you don't delete anything that's already there.
          
          
          Do Create Vars and Save Settings and that's that.
          Norman
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            YOU ARE A GEM!!!!
            Thank You Norman for taking the time to come up with that code it works like a charm.

            You are a delight!!

            Thanks again

            Cheers,

            Jacy

            www.jacyscomputers.com.au
            Jacys Computer Supplies
            Web: http://www.jacyscomputers.com.au
            email: sales@jacyscomputers.com.au

            Comment


              #7
              I've incorporated this into the NorTree GUI now. There's a new download on www.rouxel.cwc.net/nortree/

              Norman
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment

              Working...
              X