FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Changing the visibility of the scroll bar
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Changing the visibility of the scroll bar
Posted: Mon Feb 03, 2025 07:02 PM

Hi,

There is an object of type TXBrowse. I need to hide/show its vertical scroll while working. How can I do this ?

Posts: 99
Joined: Thu Jul 12, 2007 02:02 PM
Re: Changing the visibility of the scroll bar
Posted: Wed Feb 05, 2025 04:40 PM
Hi Natter,

try this
#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
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Changing the visibility of the scroll bar
Posted: Thu Feb 06, 2025 07:39 AM
Thanks Massimo

Just a comment, for 64 bits we must use:

ShowScrollBar( (HWND)hb_parnll( 1 ), SB_VERT, hb_parl( 2 ) ) ;
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Changing the visibility of the scroll bar
Posted: Thu Feb 06, 2025 08:10 AM

Thanks, Massimo !

Continue the discussion