Source language: Translate to:

Scrollable Content, scrollable Container

Post your suggestions for future versions of NeoBook

Moderator: Neosoft Support

Scrollable Content, scrollable Container

Postby Cipolla » Thu Jul 04, 2013 2:02 am

Hi Dave, hi all,

i need the possibility to add scrollbars to a container object. i have content that does not fit to the visible part of the container-area, and so i need to scroll this content up/down or also to the left/right.

I know there have been some posts in the past, and there are also some workarounds using build in stuff. The problem is, with neobook build in functions it is only possible to scroll the complete client area.

I have a navigation/button bar at the top and a statusbar at the bottom. So only the content of the middle container, which is centered between top/bottom, should be scrolled.

I did some other workarounds with hpwImage (hpwScrollbarCreate) and i tried npHook for using mouswheel to move the scrollbars, but in the end it is not working as expected.

I need a windows style scrollbar which:
- can be attached to a container
- can be scrolled with mouse wheel when the container OR an object inside this Container has the Focus

I am willing to pay for individual development. But i need this option just in time
Greetings from Germany
Klaus
User avatar
Cipolla
 
Posts: 166
Joined: Fri Apr 01, 2005 1:45 am
Location: Germany

Re: Scrollable Content, scrollable Container

Postby Gaev » Thu Jul 04, 2013 5:52 am

Klaus:

i need the possibility to add scrollbars to a container object.
The Container tool/object is designed to be a "container" in which you place other tools/objects.

I have a navigation/button bar at the top and a statusbar at the bottom. So only the content of the middle container, which is centered between top/bottom, should be scrolled.
The section of the Help file for this tool/object shows this exact scenario as an example of deployment of the Container tool/object.
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Scrollable Content, scrollable Container

Postby Cipolla » Thu Jul 04, 2013 7:02 am

Hello Gaev,

thank you for your reply.

The Container tool/object is designed to be a "container" in which you place other tools/objects.


That is exactly the way i use this object :wink:

The section of the Help file for this tool/object shows this exact scenario as an example of deployment of the Container tool/object.


I think you are getting me wrong. I know how to build a sizeable application and how to use containers. Please see my screenshot. The middle section (the light blue container with the input boxes) should be scrollable. Thats all ;)

[Edit] -> Here is the screenshot

Image
Greetings from Germany
Klaus
User avatar
Cipolla
 
Posts: 166
Joined: Fri Apr 01, 2005 1:45 am
Location: Germany

Re: Scrollable Content, scrollable Container

Postby Gaev » Thu Jul 04, 2013 11:13 am

Klaus:
The middle section (the light blue container with the input boxes) should be scrollable.
Sorry, I thought you needed plain/rich text in the middle section.

I tried this design ... inside a Container object I used ...

a) aText object (snap to top, bring to front) as the Header section

b) a Text object (snap to bottom, bring to front) as the Footer section

c) another container (snap to none) as the middle section ... made the height of it larger than available middle space ... placed a TextEntry object in it.

Then, using a Button object (outside the Container), I scripted a MoveObject command to move the middle section (Container) up ... it performed as desired.

So, instead of the Button, you can place a TrackBar object at the right edge of the outer Container (along the height of the middle section) ... make the inner Container a bit narrower to fit the TrackBar object ... and script the TrackBar's ValueChanging event such that the inner Container is moved up/down according to the TrackBar value ... note that you can set the Top position of the inner Container to negative positions if necessary.

If you need assistance with the scroll logic, ask on this forum (will help if you also supply the width and height of each of the objects.
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Scrollable Content, scrollable Container

Postby David de Argentina » Thu Jul 04, 2013 12:56 pm

Hi Klaus,

Try this sample:

http://www.neobook.com.ar/files/ScrollCustomWindow.zip

Of course it must be improved, but i think this is a good start point.

My devaluated cent,

David de Argentina
User avatar
David de Argentina
 
Posts: 1553
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Re: Scrollable Content, scrollable Container

Postby mishem » Thu Jul 04, 2013 2:36 pm

mishem
 
Posts: 574
Joined: Mon Oct 08, 2012 1:51 pm

Re: Scrollable Content, scrollable Container

Postby David de Argentina » Thu Jul 04, 2013 6:13 pm

User avatar
David de Argentina
 
Posts: 1553
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Re: Scrollable Content, scrollable Container

Postby mishem » Thu Jul 04, 2013 6:40 pm

:)
A little bit wrong.
You must specify a limit.

Boton14

Code: Select all
Setvar "[TrackBar1]" "[TrackBar1]+10"
If "[TrackBar1]" ">" "10"
Setvar "[TrackBar1]" "10"
EndIf
MoveObject "Agrupar1" "[X]" "[TrackBar1]"


Boton15

Code: Select all
Setvar "[TrackBar1]" "[TrackBar1]-10"
If "[TrackBar1]" "<" "-164"
Setvar "[TrackBar1]" "-164"
EndIf
MoveObject "Agrupar1" "[X]" "[TrackBar1]"
mishem
 
Posts: 574
Joined: Mon Oct 08, 2012 1:51 pm

Re: Scrollable Content, scrollable Container

Postby David de Argentina » Thu Jul 04, 2013 9:04 pm

Let keep something to work to Cipolla... :lol:

This demo is turning awesome...

If we work on a kind of print engine... it would be magic...

Cheers,
David de Argentina
User avatar
David de Argentina
 
Posts: 1553
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Re: Scrollable Content, scrollable Container

Postby David de Argentina » Thu Jul 04, 2013 10:01 pm

Last update today.

* added mishem code
* added code to the guide of the trackbar.

http://www.neobook.com.ar/files/ScrollCustomWindow.zip

Notes to Dave:

The guide of the trackbar moves the objects with an interval of one unit, in the case one pixel. Perhaps a good idea will be add to the trackbar object the capability of set the interval (points, units, etc), like "Step=5"

I had read the SDK and does not find the way to determine what objects are within a container, in order to do a "PrintObject" service.

Dave: could you consider add a service like PrintObject "Container1" "Draft" ?

Thanks in advance,
David de Argentina
User avatar
David de Argentina
 
Posts: 1553
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Re: Scrollable Content, scrollable Container

Postby Cipolla » Fri Jul 05, 2013 8:10 am

ok guys. Stop it for the moment :lol:

I am so sorry, that you spend so much time on scripting out a workaround. :oops:

I did some other workarounds with hpwImage (hpwScrollbarCreate) and i tried npHook for using mouswheel to move the scrollbars, but in the end it is not working as expected.


So, i have a solution with scrollbars (Plugin: hpwimage -> Action hpwScrollbar....), and this is exactly working like the demo you did here with the trackbar. There is no need for a trackbar or a hidden Button, HPW's plugin does the job. Even more i am able to use the mouse wheel (and that is the important part when we talk about a "standard windows scrollbar") when i would purchase the Plugin npHook. And my solution is working with container and/or custom Window. The container shown in the image is also sizeable by dragging the grey line between DB-Table and container. So the scrollbar i used in my project changes the height on the fly and it changes the scrolling values and and and...

But what i really need (want) is a NEOBOOK NATIV (or Plugin) scrollbar that is:

- looking like windows scrollbar
- behaving like windows scrollbar (size of the scroller is depending on how much content must be scrolled, hover effect etc.)
- it is autosizing in height and/or width when Container changes the size
- it is not visible and/or disabled if no scrolling is needed
- i do not have to care about scrolling values when resizing
- it is working with MouseWheel
- etc.

I have all that working, and it is also looking like a windows style scrollbar (excapt the hover effect, ...HPW? :wink: )

But the problem is:

- 1000 of code lines to do all the work (if size of container changes... resize the scrollbar, math scrolling amount... MoveObject (very slow with many objects), check container max/min, has container focus? (for MouseWheel), if other object with scrollbar has focus, don´t scroll container, etc. etc.

You have to fire up so many actions (particular when using MouseWheel) that is slowing down the whole application, and you get sometimes a strange behaviour of your app.

So as i wrote in my first Post: I am willing to pay for a NEOBOOK NATIV scrollbar or for a working plugin.

--------------------------------

My idea:

1. I place a container on the stage. Setting Snap to Center. This is the visible area, let´s say the mother-container
2. Inside the mother-container i place the "child"-container. snap is set to top, the hight is higher than the mother-container
3. I have an option to combine both container to mother & child
4. Maybe some other options like "show scrollbars if needed" or setting the scrolling amount (MouseWheel, CursorUp/Down/PageUpDwon) etc.

Thats all. Neobook or the Plugin does the rest.

- when rendering the page neobook or the plugin detects here is a combined container.
- check if there are objects outside the visible area but inside the child container
- if so show scrollbars, math the scrolling amount etc.
- onMouseEvent (MouseWheel, click on up/down or in scrowler area), onKeyEvent (CursorUp / CursorDown PageUp/PageDown) move the child container up or down

I belive, since Neobook is an outstanding RapidApplicationBuilder, many more people than me would appreciate such a native function.

[EDIT] Please excuse my bad english. :oops: [/EDIT]
Greetings from Germany
Klaus
User avatar
Cipolla
 
Posts: 166
Joined: Fri Apr 01, 2005 1:45 am
Location: Germany

Re: Scrollable Content, scrollable Container

Postby Cipolla » Fri Jul 05, 2013 8:22 am

Here is an image of the working scrollbar (including MouseWheel):

Image
Greetings from Germany
Klaus
User avatar
Cipolla
 
Posts: 166
Joined: Fri Apr 01, 2005 1:45 am
Location: Germany

Re: Scrollable Content, scrollable Container

Postby HPW » Fri Jul 05, 2013 10:04 am

... resize the scrollbar ...


It may help a bit that hpwScrollbar now support resizing with its rectangle.
Of cource a native scroll container would be great!

Regards
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: Scrollable Content, scrollable Container

Postby Neosoft Support » Fri Jul 05, 2013 10:10 am

Hi Klaus,

There are a lot of really creative solutions here. I understand that you want something that looks and behaves exactly like a traditional Windows scroll bar. I guess none of the suggestions above quite meet all of the requirements? I can give it some thought over the weekend and see if there are any other options.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Scrollable Content, scrollable Container

Postby Cipolla » Fri Jul 05, 2013 11:07 am

Neosoft Support wrote:Hi Klaus,

There are a lot of really creative solutions here. I understand that you want something that looks and behaves exactly like a traditional Windows scroll bar. I guess none of the suggestions above quite meet all of the requirements? I can give it some thought over the weekend and see if there are any other options.


Hello Dave,

the solution (and the suggestions) is ok. More or less.

And btw., that is the reason why i love neobook so much, there is alway a solution and a great community.

Well, the main problem is actually that the mass of actions, that need to be executed, slows the application extremly down.
Moreover i (and of course my customer) is missing the the look & feel of a fluent working scrollbar.

You will get into real trouble if you have more than one scrolling container on the stage. I gave it a try... Damn, don´t try that at home ;)

/Klaus
Greetings from Germany
Klaus
User avatar
Cipolla
 
Posts: 166
Joined: Fri Apr 01, 2005 1:45 am
Location: Germany

Next

Return to NeoBook Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest