FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Bottom alignment of xBrowse!? ( Solved! )
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM

Bottom alignment of xBrowse!? ( Solved! )

Posted: Tue Jan 06, 2009 08:10 PM
Dear friends,

I want to alignment a get to bottom of xbrowse, with your width, but I can't do!

@ 1, 1 GET oBrwGet VAR uBrwGet OF oBrw:oWnd

oBrwGet:move( oBrw:nHeight, oBrw:nLeft, oBrw:nBottom, 20, .T. )
     //:move( nTop, nLeft, nBottom, nRight, lRepaint )

oBrwGet:refresh()
oBrwGet:setFocus()


Please, somebody help me!!!!
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM

Re: Bottom alignment of xBrowse!?

Posted: Tue Jan 06, 2009 08:58 PM
create get outside browse area exactly bottom margin

#include "FiveWin.ch"
#include "xbrowse.ch"

// xbrowse imagen button get

function main()

local oDlg, oBrw
local aArray := {}
local uVal
local nI
local oGet
local nWdGet := 0

for nI = 1 to 20
aadd( aArray, { "Row:"+StrZero(nI,2)+" Col:01",;
								"Row:"+StrZero(nI,2)+" Col:02",;
								"Row:"+StrZero(nI,2)+" Col:03",;
								"Row:"+StrZero(nI,2)+" Col:04",;
								"Row:"+StrZero(nI,2)+" Col:05",;
								"Row:"+StrZero(nI,2)+" Col:06" } )
next

DEFINE DIALOG oDlg Title "Test xBrowse " size 700,300


oBrw:= txbrowse():new( oDlg )
oBrw:nRowHeight := 25
oBrw:nColDividerStyle := LINESTYLE_BLACK
oBrw:nRowDividerStyle := LINESTYLE_BLACK
oBrw:SetArray( aArray )
oBrw:nTop := 0
oBrw:nLeft := 0
oBrw:nBottom := 50
oBrw:nRight := 100
oBrw:CreateFromCode()

nWdGet := oBrw:BrwWidth() + ;
					if( oBrw:lVScroll, GetSysMetrics( 20 ), 0 )

@ oBrw:nBottom, oBrw:nLeft get oGet var uVal of oDlg pixel size nWdGet, 10

ACTIVATE DIALOG oDlg center

return nil
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM

Re: Bottom alignment of xBrowse!?

Posted: Tue Jan 06, 2009 09:41 PM
Daniel,

Thank you for your tip, but not work.
I get your suggest and tried this... now it's ok!

nWdGet := oBrw:brwWidth() + iif( oBrw:lVScroll, getSysMetrics( 20 ), 0 )

@ ( oBrw:nTop + oBrw:nHeight ) - 20, oBrw:nLeft GET oBrwGet VAR uBrwGet OF oBrw:oWnd PIXEL SIZE nWdGet, 20
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9

Continue the discussion