Welcome! Log In Create A New Profile

Advanced

WD - How to emulate (forcing) scrollbar move on Layout control

Posted by Gianni Spano 
WD - How to emulate (forcing) scrollbar move on Layout control
December 29, 2024 10:21AM
Hello to all

I'm trying to use the Layout control (Disposition in french) where i can insert various cells with their different controls (edit, static, table, etc etc). The Layout control has 8 different sectons and and i would like to jump to these sections based on the section selected from a little menu.
As i see the Layout control has its own scrollbar, but i think it isn't available for a emulate solution, but it needs to be used manually scrolling the mouse.

Can i use Windows API calls to emulate and get the control of the scrollbar of the Layout control?
If yes, what kind of approach do i need? Or, is there another solution to solve my issue?

Thanks in advance
Re: WD - How to emulate (forcing) scrollbar move on Layout control
December 29, 2024 10:46AM
LOCAL
n is int

n=CallDLL32("user32", "GetScrollPos" , Handle("WIN_MAIN"), 1)

This is for example to get a scroll value out of an control? in this case for vertical, with 0 you can get the horizontal value.

And of course you can set the scrollbar value:

ScrollbarPosition("WIN_MAIN", sbVert, n) //sbHorz = Horizontal

Hope that helps?



Edited 1 time(s). Last edit at 12/29/2024 10:48AM by apredl.
Re: WD - How to emulate (forcing) scrollbar move on Layout control
December 29, 2024 12:57PM
Thank you Gunther

I will give a try... thumbs up

Gianni
Re: WD - How to emulate (forcing) scrollbar move on Layout control
December 29, 2024 04:22PM
Hi Gianni,

this man with the superpowers of programming is Alexander Predl, my son!

Kind regards,
Guenter Predl
office@windev.at



Edited 1 time(s). Last edit at 12/29/2024 05:37PM by gpredl.
Re: WD - How to emulate (forcing) scrollbar move on Layout control
December 29, 2024 06:22PM
Ok...

Thank you, Alex smiling smiley

Gianni
Re: WD - How to emulate (forcing) scrollbar move on Layout control
December 31, 2024 09:41AM
Hi Gianni
Maybe this can help. Improvisation, but it work.
I was create LAYOUT_TEST with 3 CELL's of height=500 and place 1 GET on every CELL
I hope this will help you to find your way.

VIDEO

I am forget to include PROCEDURE in this video so here is it. Procedure return position of acrollbar

PROCEDURE MyLayout_Scroll()
RESULT ScrollbarPosition(LAYOUT_Test)



Edited 1 time(s). Last edit at 12/31/2024 09:42AM by IsmirB.
Re: WD - How to emulate (forcing) scrollbar move on Layout control
December 31, 2024 12:13PM
Hello Ismir

Thank you for you example..It is clear..

Happy new year smiling smiley

Gianni
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: