* * *

Author Topic: ATScrollBar  (Read 4436 times)

Alextp

  • Sr. Member
  • ****
  • Posts: 425
    • UVViewSoft
ATScrollBar
« on: May 30, 2014, 10:13:05 pm »
This is my own scrollbar - not OS themed, but acts like Win one. It's fully owner-drawn, just set OnOwnerdraw and draw any theme.

Tested on Win/Linux/Mac, Lazarus 1.2
As I wrote below, it's better than any other scrollbar from Torry.

Quote
mouse:
- click and holding mouse on arrows
- click and holding mouse on page-up (area above thumb) / page-down (area below thumb)
- drag of thumb

https://github.com/Alexey-T/ATScrollBar


« Last Edit: January 04, 2017, 04:21:16 am by Alextp »

Alextp

  • Sr. Member
  • ****
  • Posts: 425
    • UVViewSoft
-
« Reply #1 on: May 31, 2014, 01:57:43 am »
I looked Torry.net: 95% of all scrollbars is crap. Full crap.
Only one is rather ok: ALScrollbar from Alcinoe pack, but it has
minuses too: no owner draw (I didn't find), page size is not changable,
and it has WM*** messages handlers. I didn't see TMS bars, they cost
$30 or more.

mse

  • Full Member
  • ***
  • Posts: 228
Re: ATScrollBar 0.8 released
« Reply #2 on: May 31, 2014, 10:41:17 am »
Do you know MSEgui? The scrollbar code is here:
https://gitorious.org/mseide-msegui/mseide-msegui/source/lib/common/kernel/msescrollbar.pas
Probably even more crap. ;-)

Blaazen

  • Hero Member
  • *****
  • Posts: 2385
  • POKE 54296,15
    • Eye-Candy Controls
Re: ATScrollBar 0.8 released
« Reply #3 on: May 31, 2014, 11:57:21 am »
Scrollbars in LCL-Qt (and LCL-GTK2 maybe too) also behave wrongly. They allow Position PageSize > Maximum, which is illogical and differs from LCL-Win and Delphi7. I'll report it.

EDIT: This comes from Qt-Designer.
EDIT2: Reprted in 26243

EDITED: PageSize, not Position
« Last Edit: May 31, 2014, 04:16:30 pm by Blaazen »
Lazarus 1.9.0 r55743 FPC 3.0.2 x86_64-linux-qt Chakra, Qt 4.8.7, Plasma 5.9.4
Lazarus 1.6.4 r54278 FPC 3.0.2 i386-win32-win32/win64 Wine 2.4

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

zeljko

  • Hero Member
  • *****
  • Posts: 922
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: ATScrollBar 0.8 released
« Reply #4 on: May 31, 2014, 03:18:38 pm »
Position > Max ? It's (should be) discarded by widgetset if it's so, but depends how widgetset treats maximum.

Blaazen

  • Hero Member
  • *****
  • Posts: 2385
  • POKE 54296,15
    • Eye-Candy Controls
Re: ATScrollBar 0.8 released
« Reply #5 on: May 31, 2014, 04:14:54 pm »
I made mistake. There should be PageSize > Max. Bugreport is correct.
Lazarus 1.9.0 r55743 FPC 3.0.2 x86_64-linux-qt Chakra, Qt 4.8.7, Plasma 5.9.4
Lazarus 1.6.4 r54278 FPC 3.0.2 i386-win32-win32/win64 Wine 2.4

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Alextp

  • Sr. Member
  • ****
  • Posts: 425
    • UVViewSoft
-
« Reply #6 on: May 31, 2014, 05:09:48 pm »
MSEgui scrollbar is not crap, but...
a) uses:
 mseguiglob,msegraphics,msegraphutils,msetimer,mseevent,mseshapes,
 classes,mclasses,msetypes,msegui,mseclasses,mseglob;
b) has "interface(..)"
c) pas file 46K, mine is 16K
« Last Edit: June 01, 2014, 02:34:55 am by Alex22 »

Alextp

  • Sr. Member
  • ****
  • Posts: 425
    • UVViewSoft
Re: ATScrollBar 1.0 released
« Reply #7 on: June 01, 2014, 05:25:48 am »
So I added 2 props (see them in my demo, updated - e.g. indent can be right and left and top); made code nicer; now it's 1.0 release.

BeniBela

  • Hero Member
  • *****
  • Posts: 571
    • homepage
Re: ATScrollBar 1.0 released
« Reply #8 on: June 01, 2014, 04:12:53 pm »
I made a scrollbar, too! (add a {$mode delphi} if it does not compile)

Is it crap?

Probably  :-[, but I only was 13 when I wrote it...

Alextp

  • Sr. Member
  • ****
  • Posts: 425
    • UVViewSoft
Re: ATScrollBar
« Reply #9 on: January 04, 2017, 04:15:38 am »
Now I see how Amiga MUI was made, and see styles of scrollbar: 2 arrows at bottom, 2 arrs at top, arrs hidden.
I made these styles now.
KindArrows prop.

Pic shows kind: 2 arrows on top


josh

  • Sr. Member
  • ****
  • Posts: 404
Re: ATScrollBar
« Reply #10 on: February 27, 2017, 04:17:57 pm »
Hi

Just download the ATSCROLLBAR to see how configurable etc, and am very impressed with the visual and operation of the control.

But I think I may have found a bug,
If I place a ATScrollbar on form, set its max value in runtime to say 120;
If I then add a label to form and update the caption on label in the ATSCROLL on change event with
label1.caption:=inttostr(atscroll1.position).

When I move the control it only goes from 0 to 100 ( not 120); this is true if I set max to higher say 1200; the maximum the control value moves is 0-1190.

Should the scrollbar not generate the entire range from min to max ? or have I done something wrong.

Josh
Development Installation Lazarus 1.3, FPC 2.7.1,Windows 7/8 32/64, OSX, *nix

Test Environment Lazarus & FPC Trunk on Windows and OSX (Cocoa Mainly on OSX). Testing also Crosscompile windows to OSX.. 
Any posts made from 2015 will be based on Lazarus Trunk.

Alextp

  • Sr. Member
  • ****
  • Posts: 425
    • UVViewSoft
Re: ATScrollBar
« Reply #11 on: February 27, 2017, 05:02:33 pm »
It's not a bug, if i set range 0...200, and pagesize 20, then bar pos, goes from 0 to 180..

molly

  • Hero Member
  • *****
  • Posts: 1799
Re: ATScrollBar
« Reply #12 on: February 27, 2017, 05:41:50 pm »
It's not a bug, if i set range 0...200, and pagesize 20, then bar pos, goes from 0 to 180..
Proportional scroll gadgets is a concept that is not very well-known to everyone it seems.

Indeed, MUI/Zune has some very nice concepts.

Unfortunately one of those concepts is also auto size/layout, which makes it nearly impossible to have a good/matching LCL/MUI widgetset implementation

Your custom controls help us out a lot there Alextp so, we thank you for that  :-*

josh

  • Sr. Member
  • ****
  • Posts: 404
Re: ATScrollBar
« Reply #13 on: February 27, 2017, 10:24:39 pm »
Hi

That make sense; now I know its a 'proportional scroll' that helps.

If I set pagesize to 1 then it give me the full range;

Does the thumb control have a minimum or possibly a fixed configurable size.

I have a grid that has 1000's of rows and the 'native' scroll bars are horrible in looks, so was looking for a scroll bar that I could replace with, if I set max value to grid row count-less visible rows so that i can then on change of scroll assign the toprow to the atscroll position. this does work however the thumb control becomes a very thin line, even more pronounced if the form is resized to full screen;

I hope the above make sense.

Josh
Development Installation Lazarus 1.3, FPC 2.7.1,Windows 7/8 32/64, OSX, *nix

Test Environment Lazarus & FPC Trunk on Windows and OSX (Cocoa Mainly on OSX). Testing also Crosscompile windows to OSX.. 
Any posts made from 2015 will be based on Lazarus Trunk.

molly

  • Hero Member
  • *****
  • Posts: 1799
Re: ATScrollBar
« Reply #14 on: February 27, 2017, 10:43:50 pm »
@Josh,
And there you have discovered one of the flaws with regards to proportional scroll gadgets. If the number of pixels isn't enough o 'cover' your complete list then their usability is more or less 'lost' in translation.

Sorry, i can't comment on AtScrollBar's specifics/internals. i'll better leave that for the developer of the control.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus