Page 1 of 1
Changing the visibility of the scroll bar
Posted: Mon Feb 03, 2025 7:02 pm
by Natter
Hi,
There is an object of type TXBrowse. I need to hide/show its vertical scroll while working. How can I do this ?
Re: Changing the visibility of the scroll bar
Posted: Wed Feb 05, 2025 4:40 pm
by MaxP
Hi Natter,
try this
Code: Select all | Expand
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oWnd, oBtn1, oBtn2
DEFINE WINDOW oWnd TITLE "TEST" COLOR "N/W" FROM 10, 10 TO 30, 70 VSCROLL
@ 8, 10 BUTTON oBtn1 PROMPT "GO ON" SIZE 50, 20 ACTION ShowScrollBar( oWnd:hWnd, .T. ) OF oWnd
@ 8, 20 BUTTON oBtn2 PROMPT "GO OFF" SIZE 50, 20 ACTION ShowScrollBar( oWnd:hWnd, .F. ) OF oWnd
ACTIVATE WINDOW oWnd
RETURN NIL
#pragma BEGINDUMP
#include <windows.h>
#include <winioctl.h>
#include <stdio.h>
#include <shlobj.h>
#include "hbapi.h"
#include "hbapiitm.h"
#include "hbapifs.h"
#include "hbvm.h"
#include "hbstack.h"
HB_FUNC( SHOWSCROLLBAR )
{
ShowScrollBar( (HWND)hb_parnl( 1 ), SB_VERT, hb_parl( 2 ) ) ;
}
#pragma ENDDUMP
Massimo
Re: Changing the visibility of the scroll bar
Posted: Thu Feb 06, 2025 7:39 am
by Antonio Linares
Thanks Massimo
Just a comment, for 64 bits we must use:
ShowScrollBar( (HWND)hb_parnll( 1 ), SB_VERT, hb_parl( 2 ) ) ;
Re: Changing the visibility of the scroll bar
Posted: Thu Feb 06, 2025 8:10 am
by Natter
Thanks, Massimo !