Recent

Author Topic: ATScrollBar  (Read 12639 times)

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • 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

  • Hero Member
  • *****
  • Posts: 2386
    • 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

  • Sr. Member
  • ****
  • Posts: 286
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: 3237
  • 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 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

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

zeljko

  • Hero Member
  • *****
  • Posts: 1594
    • 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: 3237
  • 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 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

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

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • 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

  • Hero Member
  • *****
  • Posts: 2386
    • 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: 905
    • 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

  • Hero Member
  • *****
  • Posts: 2386
    • 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

  • Hero Member
  • *****
  • Posts: 1271
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
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • 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: 2330
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

  • Hero Member
  • *****
  • Posts: 1271
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
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

molly

  • Hero Member
  • *****
  • Posts: 2330
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.

 

TinyPortal © 2005-2018