xBrowse from resource

xBrowse from resource

Postby Otto » Fri Feb 06, 2009 3:55 pm

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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6037
Joined: Fri Oct 07, 2005 7:07 pm

Re: xBrowse from resource

Postby Daniel Garcia-Gil » Fri Feb 06, 2009 5:28 pm

hello otto...

xbrowse should be custom control

maybe you do use xbrowse resource
windows style 0x50010000

change to 0x50810000
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: xBrowse from resource

Postby ukoenig » Fri Feb 06, 2009 5:38 pm

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 :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: xBrowse from resource

Postby Otto » Fri Feb 06, 2009 7:08 pm

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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6037
Joined: Fri Oct 07, 2005 7:07 pm

Re: xBrowse from resource

Postby ukoenig » Fri Feb 06, 2009 8:16 pm

I don't understand this, it MUST work. Inside the resource HScroll and VScroll are .T.

My source :

Code: Select all  Expand view

// ---  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
...
...



oLbx3:lHScroll := .T.
oLbx3:lVScroll := .T.
Image

oLbx3:lHScroll := .F.
oLbx3:lVScroll := .F.
Image

Maybe it is defined on a wrong place ?

Daniel's Style settings is defined in Folder-Page 1, not in the Dialog-resource
but I found the value 50800000 ???
Image

Regards
Uwe :lol:
Last edited by ukoenig on Fri Feb 06, 2009 9:40 pm, edited 4 times in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: xBrowse from resource

Postby Daniel Garcia-Gil » Fri Feb 06, 2009 8:42 pm

otto

did you try my suggestion ?

from resource program change windows style to 0x50810000
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: xBrowse from resource

Postby Otto » Fri Feb 06, 2009 9:51 pm

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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6037
Joined: Fri Oct 07, 2005 7:07 pm

Re: xBrowse from resource

Postby Otto » Fri Feb 06, 2009 10:21 pm

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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6037
Joined: Fri Oct 07, 2005 7:07 pm

Re: xBrowse from resource

Postby Antonio Linares » Fri Feb 06, 2009 10:21 pm

Otto,

Please try this from the ON INIT clause of the dialog:

ACTIVATE DIALOG oDlg ON INIT oBrw:oVScroll:SetRange( 0, 0 )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41351
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: xBrowse from resource

Postby Otto » Fri Feb 06, 2009 10:43 pm

Thank you, Antonio.
I tried this solution this afternoon after I read this thread.

viewtopic.php?f=3&t=12579&p=63467&hilit=scroll+off#p63467

But the painting is not ok as you can see from my screen shot.


Image
Best regards,
otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6037
Joined: Fri Oct 07, 2005 7:07 pm

Re: xBrowse from resource

Postby ukoenig » Fri Feb 06, 2009 10:56 pm

Hello Otto,

I tested inside the Imageviewer, because there is no folder.
It works perfect without problems. I'm sure there must be something wrong
with Your source.

Image

Code: Select all  Expand view

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()

.....
.....



Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: xBrowse from resource

Postby Otto » Fri Feb 06, 2009 11:06 pm

Uwe, I use in this case a rc file. From sourcecode I have no problems.
Regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6037
Joined: Fri Oct 07, 2005 7:07 pm

Re: xBrowse from resource

Postby ukoenig » Fri Feb 06, 2009 11:32 pm

Otto,

I allways use RC-files. I never use < from code > ( to much work )
Maybe there is something wrong with Your resource.
Sometimes, if I have a problem with a resource, I rename it and define a new fresh dialog,
then copy from the renamed resource the different objects to the new one.
Often it was a solution.

oLbx:CreateFromResource( 110 )
---------------------------------------

There are some FWH-xBrowse-samples working with dialogs and RC-files :
Testxbr3.prg works with a resource.
Maybe for a test, add these two lines to this part :

Code: Select all  Expand view

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.



The dialog-part of my RC-file a Xbrowse and a Folder next each other :
-----------------------------------------------------------------------------------
Code: Select all  Expand view

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
}



Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: xBrowse from resource

Postby Otto » Sat Feb 07, 2009 12:05 am

Hello Uwe,

thank you very much for your help. Now it is working.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6037
Joined: Fri Oct 07, 2005 7:07 pm


Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 29 guests