Recent

Author Topic: Upside down vertical tscrollbar and ttrackbar  (Read 8892 times)

koko

  • New Member
  • *
  • Posts: 19
Upside down vertical tscrollbar and ttrackbar
« on: September 18, 2007, 04:30:50 pm »
Tscrollbars and Ttrackbar with orientation set to Vertical, will result in the min value showed in the upper part of the component and the max in the lower part.

While i can bypass that behaviour when i use tscrollbars, it becomes harder with Ttrackbar which 'self displays' the current position.

Is that a known issue or am i missing something?

Thanks in advance.

(http://img260.imageshack.us/img260/3796/yaf4cj2.png)

antonio

  • Hero Member
  • *****
  • Posts: 605
RE: Upside down vertical tscrollbar and ttrackbar
« Reply #1 on: September 18, 2007, 08:14:40 pm »
Could you set Min Value to another value? What are you trying to do?

koko

  • New Member
  • *
  • Posts: 19
Upside down vertical tscrollbar and ttrackbar
« Reply #2 on: September 19, 2007, 11:05:56 pm »
Nothing particular, i'm just trying to use a vertical scrollbar.
The problem is that the minimum vaule is shown on the top, and it doesn't look very 'intuitive', so i'm wondering if i am missing something which could 'flip' that behaviour, if it is intended to be so, or if it is just a bug.
I also tried to set, say, min=100 and max=0, but lazarus does not allow it.

I hope it is clear now, sorry for my English.

RudieD

  • Full Member
  • ***
  • Posts: 234
Upside down vertical tscrollbar and ttrackbar
« Reply #3 on: September 19, 2007, 11:10:48 pm »
Line 1 is usually on top ?

So you could use MyBar.MaxValue-MyBar.Pos.
The FRED Trainer. (Training FRED with Lazarus/FPC)

koko

  • New Member
  • *
  • Posts: 19
Upside down vertical tscrollbar and ttrackbar
« Reply #4 on: September 20, 2007, 08:16:33 pm »
In fact that's what i do when i use Tscrollbars.
But what about Ttrackbars ?
They display the current position (yes, they draw the number) by themselvs.

Still wondering if it is a bug, as far as i remember delphi/kylix didn't act like that, am i wrong?

antonio

  • Hero Member
  • *****
  • Posts: 605
Upside down vertical tscrollbar and ttrackbar
« Reply #5 on: September 20, 2007, 08:27:51 pm »
On my Delphi 2.0 TTrackbar does not draw by itself.

Depending on what you are doing, beginning from the top or from the bottom can be equally intuitive. So maybe they are intended to be so.

The self drawing feature can be to make something easier.

If it is so important, you can subclass the component and draw it by yourself, without number drawing feature. Just search on LCL source, find the code, and copy it without number drawing to an overriding paint procedure. You can even invert the component behavior, just subclassing it and overriding paint procedure.

koko

  • New Member
  • *
  • Posts: 19
Upside down vertical tscrollbar and ttrackbar
« Reply #6 on: September 20, 2007, 10:22:56 pm »
Thanks, i'll try!

 

TinyPortal © 2005-2018