Recent

Author Topic: [SOLVED] ATTabs howto; when show scrollbutton  (Read 1010 times)

d7_2_laz

  • Hero Member
  • *****
  • Posts: 510
[SOLVED] ATTabs howto; when show scrollbutton
« on: March 05, 2021, 10:48:13 am »
Ending my integration of attabs, i've a small howto question:
is it suppurted by the control, or has it to be done by the programmer, to achieve:
show the scrollbutton only if needed (if there is something to scrol) ?

By that i found a small glitch where i'm not sure whether it's due to my own missettiings or due to a glitch: artifacts may occur. See attached testcase and images. For to reproduce:
- start testcase, you will see three tabs
- press the plus button, a tab4 will appear
- press the plus button again, a tab5 will appear which is only partially shown (truncated, that's ok). Look at the left side. you wil see an artifact (just as if a truncated tab's painting tries to finish at the start pos of the control.
- click onto tab5 so that it becones active. You'll see an artifact above the plus sign.
- click the plus button again and see what happens.

« Last Edit: March 05, 2021, 04:13:59 pm by d7_2_laz »
Lazarus 3.2  FPC 3.2.2 Win10 64bit

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Re: ATTabs howto; when show scrollbutton; how tab ensurevisibible
« Reply #1 on: March 05, 2021, 11:06:32 am »
Before I try testcase-
- red line is not artifact. it is scrollbar here (not clickable).
OptShowScrollMark

- black pixels in corners of tabs-- fixed in Github.

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Re: ATTabs howto; when show scrollbutton; how tab ensurevisibible
« Reply #2 on: March 05, 2021, 11:07:35 am »
And currently not possible to auto-hide scroll < > arrows.

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Re: ATTabs howto; when show scrollbutton; how tab ensurevisibible
« Reply #3 on: March 05, 2021, 12:05:37 pm »
Inspiration. Made change:

2021.03.05
+ ATTabs: paint scroll < > arrows dimmed, when no scrolling is needed

d7_2_laz

  • Hero Member
  • *****
  • Posts: 510
Re: ATTabs howto; when show scrollbutton; how tab ensurevisibible
« Reply #4 on: March 05, 2021, 01:00:55 pm »
Hello Alextp,

OptShowScrollMark:=False does remove the 'artifacts' (i already noticed their distinct color (red), but that just was the info i did miss). OK  :) :D :D  That's fine now.

The Inspiration: see that yet with the today's version. Hm., the button area itself stays still there, but basically it's much better than before.

PS: i have still  - with today's version, although doing on the  tab control  (and/or the parent panel): ParentColor:=false and Color :=clWhite,   the tab area itself in dark ... will look at it more closely this afternoon, i'm sure it's easily changeable.


Lazarus 3.2  FPC 3.2.2 Win10 64bit

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Re: ATTabs howto; when show scrollbutton; how tab ensurevisibible
« Reply #5 on: March 05, 2021, 01:04:20 pm »
You need ColorBg property. not Color.

d7_2_laz

  • Hero Member
  • *****
  • Posts: 510
[SOLVED] ATTabs howto; when show scrollbutton
« Reply #6 on: March 05, 2021, 04:12:10 pm »
Yep. of course ... It's good!  :) :D
Lazarus 3.2  FPC 3.2.2 Win10 64bit

 

TinyPortal © 2005-2018