I have created a xbrowse from resource but can’t turn off the scrollbars.
Does someone know how to turn off the scrollbars?
Thanks in advance
Otto
I have created a xbrowse from resource but can’t turn off the scrollbars.
Does someone know how to turn off the scrollbars?
Thanks in advance
Otto
hello otto...
xbrowse should be custom control
maybe you do use xbrowse resource
windows style 0x50010000
change to 0x50810000
Hello Otto,
I use only resources in my tools and I don't have any problems.
Did You use these settings ? :
oBrw:lHScroll := .F.
oBrw:lVScroll := .F.
You can switch the Scrollbars ON and OFF at runtime.
It doesn't matter, if the scrollbars are defined inside the resource.
Regards
Uwe ![]()
Thank you for your help. I tried both suggestions with no success.
My xBrowse is inside a DIALOG.
Do you have another idea?
Best regards,
Otto
// --- START - FARBE Windows -------------------------------
oLbx3 := TXBrowse():New( oFld:aDialogs[1] )
oLbx3:nMarqueeStyle := MARQSTYLE_HIGHLROW
oLbx3:nColDividerStyle := LINESTYLE_BLACK
oLbx3:nRowDividerStyle := LINESTYLE_BLACK
oLbx3:nRecSelColor = 15512898
// 0 = Black
// 16777215 = White
// 8388608 = DarkBlue
// 15365376 = Blue
// 16757606 = Blue +
// 16764831 = Blue ++
// 16767411 = Blue +++
// Selected Row on Focus ( Text / Background )
// ------------------------------------------------------------
oLbx3:bClrSelFocus = { || { 0, 15512898 } }
// Selected Row on LostFocus ( Text / Background )
// -----------------------------------------------------------------
oLbx3:bClrSel = { || { 16777215, 128 } }
*16435297
*oLbx3:bClrSel = { || { 16777215, 11513775 } } // Selected Row
*oLbx3:bClrSel = { || { 16777215, 15512898 } }
oLbx3:SetArray( aBRCOLOR1 )
oLbx3:aCols[ 1 ]:cHeader = Padr("No.", 3)
oLbx3:aCols[ 2 ]:cHeader = Padr("Start", 19)
// Setting inside the Resource-file are ignored
// ----------------------------------------------------
oLbx3:lHScroll := .F. // .T.
oLbx3:lVScroll := .F. // .T.
oLbx3:lFooter := .T.
oLbx3:nFooterHeight := 7
...
...


otto
did you try my suggestion ?
from resource program change windows style to 0x50810000
Hello Uwe, hello Daniel,
thank you for your help.
Uwe your xBrowse is inside a folder. There is also a FIVEWIN sample with folders which is working fine.
My xBrowse is inside a DIALOG(style POPUP) which is called from an MDI window. Maybe this is the problem.
Daniel sure I tried your suggestion but with no success.
I will insert some msginfos into xBrowse source code. Maybe I can find out the problem.
Any more ideas where to look.
Best regards,
Otto
I found out that
the new method sets
::lHScroll := .t.
::lVScroll := .t.
to true and then in the
method Initiate in any case a scrollbar is made.
if ::lVScroll .or. lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), WS_VSCROLL )
DEFINE SCROLLBAR ::oVScroll VERTICAL OF Self
Endif
What should I do?
Regards,
Otto
Otto,
Please try this from the ON INIT clause of the dialog:
ACTIVATE DIALOG oDlg ON INIT oBrw:oVScroll:SetRange( 0, 0 )


DEFINE DIALOG oDlg3 RESOURCE "PROJECT" TRANSPARENT TITLE "Image-Viewer 3.0 / 11.2008 "
oLbx := TXBrowse():New( oDlg3 )
oLbx:nMarqueeStyle := MARQSTYLE_HIGHLROW
oLbx:nColDividerStyle := LINESTYLE_BLACK
oLbx:nRowDividerStyle := LINESTYLE_BLACK
oLbx:nRecSelColor = 15512898
oLbx:bClrSelFocus = { || { 16777215, 10899511 } }
oLbx:bClrSel = { || { 16777215, 10899511 } }
oCol := oLbx:AddCol()
oCol:bStrData := { || (1)->dIMAGE}
oCol:cHeader := "Image"
oCol:nWidth := 150
// Added these 2 lines for testing
// ------------------------------------
oLbx:lHScroll := .F.
oLbx:lVScroll := .F.
oCol := oLbx:AddCol()
.....
.....Uwe, I use in this case a rc file. From sourcecode I have no problems.
Regards,
Otto
static function RddBrwRes()
local oDlg, oBrw, oCol, cAlias := cGetNewAlias( "CUST" )
cFunc := ProcName( 0 )
USE CUSTOMER NEW ALIAS (cAlias) SHARED VIA "DBFCDX"
SET ORDER TO TAG FIRST
GO TOP
MakeTotal()
DEFINE DIALOG oDlg RESOURCE "TEST" //FONT WndMain():oFont
REDEFINE XBROWSE oBrw ID 101 OF oDlg ;
COLUMNS "First", "Salary" ;
FIELDS (cAlias)->State, (cAlias)->Age ;
HEADERS nil, nil, "State", "AGE" ;
JUSTIFY .F., nil, .F., .T. ;
ALIAS cAlias AUTOSORT LINES CELL
// ----- Scrollbar-Test ------------
oBrw:lHScroll := .F.
oBrw:lVScroll := .F.PROJECT DIALOG 15, 21, 493, 305
STYLE DS_MODALFRAME | 0x4L | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX
CAPTION "Folder test"
FONT 11, "Arial"
{
CONTROL "", 110, "TXBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 4, 3, 208, 238
CONTROL "", 120, FOLDER32, 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 215, 3, 275, 176
EDITTEXT 130, 244, 182, 110, 12
EDITTEXT 135, 378, 182, 112, 12
EDITTEXT 150, 244, 219, 176, 12
EDITTEXT 160, 244, 197, 35, 12, ES_RIGHT | WS_BORDER | WS_TABSTOP
EDITTEXT 170, 307, 197, 35, 12, ES_RIGHT | WS_BORDER | WS_TABSTOP
EDITTEXT 180, 295, 243, 195, 12
EDITTEXT 190, 216, 259, 274, 19, ES_MULTILINE | WS_BORDER | WS_HSCROLL | WS_TABSTOP
DEFPUSHBUTTON "Save", 10, 4, 258, 63, 21
DEFPUSHBUTTON "Delete +/-", 20, 70, 258, 63, 21
DEFPUSHBUTTON "Pack", 30, 137, 258, 75, 21
DEFPUSHBUTTON "Exit", 80, 422, 282, 68, 21
DEFPUSHBUTTON "Image", 50, 4, 282, 63, 21
DEFPUSHBUTTON "xNVIEW", 60, 216, 282, 77, 21
DEFPUSHBUTTON "Preview", 70, 70, 282, 63, 21
DEFPUSHBUTTON "Alpha-Channel", 75, 137, 282, 75, 21
DEFPUSHBUTTON "Save Image", 85, 297, 282, 76, 21
RTEXT "Width", -1, 215, 199, 26, 8
RTEXT "Height", -1, 280, 199, 24, 8
DEFPUSHBUTTON "xNVIEW-Path", 90, 216, 235, 76, 20
DEFPUSHBUTTON "<= Reset Size", 45, 351, 197, 69, 19
RTEXT "Project", -1, 215, 221, 26, 8
RTEXT "Image", -1, 219, 184, 23, 8
DEFPUSHBUTTON "Seek", 55, 424, 219, 66, 19
RTEXT "New", -1, 356, 184, 19, 8
DEFPUSHBUTTON "", 117, 154, 243, 58, 13
LTEXT "", 115, 4, 243, 148, 13, WS_BORDER | WS_GROUP
DEFPUSHBUTTON "Batch-Edit", 95, 424, 197, 66, 19
}Hello Uwe,
thank you very much for your help. Now it is working.
Best regards,
Otto
What was the problem?
EMG