Jump to content


Photo

Extern TScrollBar


  • Please log in to reply
12 replies to this topic

#1 DelphiToday

DelphiToday
  • Members
  • 146 posts
  • Gender:Male

Posted 31 May 2017 - 10:07 AM

Hi,

 

I want to hide the scrollbars in TxVirtualGrid and use default TScrollBar because I can set Width and enable custom Styles.

How can I read values from your Scrollbars and use them?

And put them back.

 

Greetings.



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 31 May 2017 - 06:28 PM

Hi,

There is a VertScrollBar object (with Max, PageSize, Position), but you will also need OnVerticalScroll event of grid.

I'm not sure if this combination will work well, but it's worth a try.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 DelphiToday

DelphiToday
  • Members
  • 146 posts
  • Gender:Male

Posted 01 June 2017 - 02:14 PM

I have created procedure to read values. But OnVerticalScroll is only fired up when using MouseWheel.

The only one that is working is OnPaint. (OnSelect is before calculate Srolllbar)

Can I use this event safe? Because this is called many times.

Or do you know a better way?



#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 01 June 2017 - 11:17 PM

Hi,

I don't think OnPaint is good idea. I will see why OnVerticalScroll is not fired on all changes.

One solution is to subclass grid and inspect VM_SCROLL messages.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#5 DelphiToday

DelphiToday
  • Members
  • 146 posts
  • Gender:Male

Posted 02 June 2017 - 08:36 AM

WM_VSCROLL and WM_HSCROLL are not responding if you use keyboard and END/HOME. You can see original Scrollbar moving but I don't have real event for this one.

Maybe I must use al keyboard/mouse event together. OnSelect is before real change Scrollbar so not usable.

So any other ideas?



#6 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 02 June 2017 - 09:13 PM

Hi,

I will try to add fix OnVertScroll event. This is probably only valid way to do this.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#7 DelphiToday

DelphiToday
  • Members
  • 146 posts
  • Gender:Male

Posted 02 June 2017 - 09:28 PM

That's nice. So if Scrollbar move/change event OnVertScroll is always called?

Please fix OnHorizonScroll too if you want.



#8 DelphiToday

DelphiToday
  • Members
  • 146 posts
  • Gender:Male

Posted 11 June 2017 - 12:03 PM

:rolleyes:  Are you making any progress?



#9 DelphiToday

DelphiToday
  • Members
  • 146 posts
  • Gender:Male

Posted 17 June 2017 - 09:25 PM

I have add Event in 'NxControls6.pas'.

property OnCalculateScroll: TNotifyEvent read FOnCalculateScroll write FOnCalculateScroll;

procedure TNxScrollControl6.ScrollContentBy(DeltaX, DeltaY: Integer);
begin
  if Assigned(FOnCalculateScroll)
    then FOnCalculateScroll(Self);
end;

This is working very good.

Will you add this yourself in NextSuite project. I think it's very helpful?

 

Greetings.



#10 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 17 June 2017 - 10:33 PM

Hi,

Maybe calling it OnScroll or OnContentScroll is better solution?

I can add it.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#11 DelphiToday

DelphiToday
  • Members
  • 146 posts
  • Gender:Male

Posted 18 June 2017 - 06:48 AM

OnContentScroll would be nice?



#12 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 18 June 2017 - 10:16 PM

Hi,

It will be included in next release.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#13 DelphiToday

DelphiToday
  • Members
  • 146 posts
  • Gender:Male

Posted 19 June 2017 - 04:42 AM

Great :) :D






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users