Page 1 of 1

Xbrowse left position on a window

Posted: Thu May 29, 2008 2:24 pm
by Richard Chidiak
Hello

How can we set from code the left position of a xbrowse

I want it to start at an offset of 200 pixels

0,200 XBROWSE OBRW of ownd PIXEL .... Does not work

oBrw := TXBrowse():New(oWND) and oBrw:nLeft := 200 does not work neither

Any clue ?

Thanks for your help,

Richard

Posted: Thu May 29, 2008 2:41 pm
by nageswaragunupudi
@ nRow,nCol XBROWSE oBrw OF oWnd ....... SIZE nWidth,nHeight PIXEL works correctly if we do not use "oWnd:oClient := oBrw".

Posted: Thu May 29, 2008 2:47 pm
by Richard Chidiak
Thanks for the clue but if we remove oWnd:oClient := oBrw the browse does not show in the window...

Still the problem,

Richard

Posted: Thu May 29, 2008 3:19 pm
by nageswaragunupudi
It is working for me.
Modified the code in the testxbrw3.prg as below

Code: Select all

   @ 100,20 XBROWSE oBrw ;
         COLUMNS "State", "City", "First", "Married", "HireDate", "Age", "Salary", "Last" ;
         JUSTIFY .f., AL_CENTER, .t. ;
         OF ownd ;
         SIZE 400,300 PIXEL ;
         ALIAS cAlias AUTOSORT


Here is the screen shot
Image[/code]

Posted: Thu May 29, 2008 3:21 pm
by Richard Chidiak
I am using fwh 8.04 could it be a difference ?

I will load fwh 8.05 and make a test

Richard

Posted: Thu May 29, 2008 3:24 pm
by nageswaragunupudi
I am not very sure, but I think it should work with 8.04 also. I ddi not notice any changes in 8.05 relating to this.

Posted: Thu May 29, 2008 3:29 pm
by Richard Chidiak
I am using a SDI window not a MDI like testxbr3 , I will post a small sample for testing purpose

Thanks for your help

Posted: Thu May 29, 2008 3:58 pm
by nageswaragunupudi
It is working on SDI window also. I have just tested it

Posted: Thu May 29, 2008 4:11 pm
by Richard Chidiak
OK i have it working now, the writing is important, you have to specify the size of the browse to make it work

@ 10,200 XBROWSE oBrw ;
OF wnd ;
SIZE ownd:nwidth - 200,ownd:nHeight - 30 PIXEL ;
ALIAS myalias

This syntax will work , if the size clauses is removed the browse will display but no offsets will be taken into consideration.

Rihard

Posted: Thu May 29, 2008 4:18 pm
by Antonio Linares
Richard,

We have to fix that. Thanks for your feedback! :-)