NetTalk Central

Author Topic: Scroll bar  (Read 5271 times)

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Scroll bar
« on: April 11, 2009, 01:23:07 AM »
Hi,
I want to give my FILE LOADED browses vertical scroll bar.
The way I intend to do that is by embedding a

packet = clip(packet) & '<div style="height:100;width=150;overflow:auto;">'; do SendPacket

in embedpoint: 2 Before Browse Loop / 6 Before Browse <table>

and a

packet = clip(packet) & '</div>'; do SendPacket

in embedpoint: 7 After Browse <table>

Of course the height and width have to be adjusted to get the right size.
(Maybe there is a way to retrieve the table width from the template????)
Also I don't mind that the column headers of the browse will scroll off the page  :).

'till Sofar, these settings have no effect whatsoever.
I can see the embedded code inthe page's source code

Can anyone help me out here??

Happy Easter
Rene Simons
Rene Simons
NT14.14

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Scroll bar
« Reply #1 on: April 23, 2009, 12:35:35 AM »
Hi Rene,

I think you're on the right track. However you need to put a "unit" into the height field.
eg
<div style="height:100px;width=150px;overflow:auto;">
The width one may not be necessary - if you leave it out it defaults to the normal width. If you want to limit the width then the current width is irrelevant.

For version 4.31 PR 35 I've added an extra DIV to the generated code. This allows the browse table to be in the scroll, but the browse heading, and importantly, the nav buttons below remain out.
In other words, I've added the div so you don't need to.
You can set the CSS for the DIV on the Styles tab (of the Browse.)
It's called "BrowseTableDiv".
You will almost certainly want / need a custom style for any browse that you attach this to.
As an example I've included the style
'ScrollBrowse'
in netweb.css though.

I'll try and get PR35 built and uploaded today.

Cheers
Bruce

olu

  • Sr. Member
  • ****
  • Posts: 352
    • View Profile
    • Email
Re: Scroll bar
« Reply #2 on: April 24, 2009, 03:08:35 AM »
hello just had a go by putting in the
.ScrollBrowse {
  height: 300px;
  overflow: auto;
}
in the style sheet and still no scroll bar , where am i going wrong?

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Scroll bar
« Reply #3 on: April 24, 2009, 05:33:26 AM »
Hi,

I'm not really into CSS but what if you remove the spaces after height: and scroll: ??

Rene
Rene Simons
NT14.14

olu

  • Sr. Member
  • ****
  • Posts: 352
    • View Profile
    • Email
Re: Scroll bar
« Reply #4 on: April 24, 2009, 05:57:27 AM »
thanks rene that almost work but the scroll is not inside the browse as bruce said, because all the headers move when you scroll.

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Scroll bar
« Reply #5 on: April 24, 2009, 11:41:39 AM »
Yes I figured that would happen.
I don't mind. For now.  ;)
Rene Simons
NT14.14

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Scroll bar
« Reply #6 on: April 24, 2009, 11:30:43 PM »
Ole,

you need build PR 35.
Also you need to update your web folder.

Yes, the "header row" of the browse will unfortunately scroll as well - I haven't figured out a way to avoid that - and I'm not sure it's possible with a simple Table structure.

Cheers
Bruce