Page 1 of 1

Possible, to define a Row-Startpos. in xBrowse(Array) ?

Posted: Mon Mar 10, 2008 4:24 pm
by ukoenig
Hello,

In the new Tool, i changed all radio's
to xBrowse.
I save the contents of the Row-position of the Browsers
when i close the dialog.
When i open the Dialog again, the Browser must show
the saved Row-Positions.

Image

Regards
Uwe :lol:

[/img]

Posted: Mon Mar 10, 2008 4:30 pm
by Otto
Uwe,
I use:
local nIndex:=0


MENUITEM "Select" ACTION ( oBrw:GoTop(), oBrw:nArrayAt := nIndex, oBrw:Refresh() )

Row-Position at dialog-start

Posted: Mon Mar 10, 2008 4:47 pm
by ukoenig
Hello Otto,

I don't want the position at top.
The row-positions of the browsers are saved in a ini-file.
When i open the dialog, i need the old positions.
The bar starts allways with top-positon.
With oBrw:nArrayAt := 3 the bar-position is still on Top.

Regards
Uwe :lol:

Posted: Mon Mar 10, 2008 5:08 pm
by Otto
Hello Uwe,
now I understand what you mean.
I don't have a professional solution.
But you can try with
For I = 1 to n
oBrw:GoDown()
next

But you better wait till NageswaraRao is online.
Regards,
Otto

Show saved positions of Row in xBrowse

Posted: Mon Mar 10, 2008 5:47 pm
by ukoenig
Hello Otto,

oBrw:nArrayAt := 3 works
oBrw:Refresh()

I had to do this after the Xbrowse creation.
( see picture )

Now it shows at start the saved positions.
The problem is, the user has to scroll to top
when he wants to see all options.

Maybe i find out what to do.

Regards
Uwe

Posted: Mon Mar 10, 2008 5:49 pm
by Otto
Did you try:

N:=3

For I = 1 to n
oBrw:GoDown()
next
Regards,
Otto

To show old browse-selections and all browser-rows.

Posted: Mon Mar 10, 2008 7:21 pm
by ukoenig
To show old selections and all Browse-positions
i changed the color of the old row-selections
( see screenshot )

Code: Select all


// Color Gradient End
// -------------------------
// save old var to show color
// ----------------------------------
s_COLEND := e_COLEND 

oBrw5 := TXBrowse():New( oDlg5 )
oBrw5:nMarqueeStyle := MARQSTYLE_HIGHLROW
oBrw5:nColDividerStyle	 := LINESTYLE_BLACK
oBrw5:nRowDividerStyle := LINESTYLE_BLACK
oBrw5:SetArray( aCOLEND )
oBrw5:aCols[ 1 ]:cHeader = Padr("No.", 3)
oBrw5:aCols[ 2 ]:cHeader = Padr("Select", 11)
oBrw5:lHScroll := .F.
oBrw5:lVScroll := .F.

// shows old selected value
// ---------------------------------
oBrw5:bClrStd := {|| {CLR_BLACK, ;
IIF( oBrw5:nArrayAt = s_COLEND, CLR_YELLOW, CLR_WHITE ) } }

// New color selection
// --------------------------
oBrw5:bLClicked := { | nRow, nCol | e_COLEND := oBrw5:nRowSel  }

oBrw5:CreateFromResource( 400 )

Regards
Uwe :lol: [/code]

Re: To show old browse-selections and all browser-rows.

Posted: Tue Mar 11, 2008 12:53 pm
by patrickmast
Hey guys,

Seems like xBrowse is taking over from "Standard" TBrowse?
I see more and more people use xBrowse.

Patrick

Re: Row-Position at dialog-start

Posted: Wed Mar 12, 2008 1:38 am
by nageswaragunupudi
ukoenig wrote:Hello Otto,

I don't want the position at top.
The row-positions of the browsers are saved in a ini-file.
When i open the dialog, i need the old positions.
The bar starts allways with top-positon.
With oBrw:nArrayAt := 3 the bar-position is still on Top.

Regards
Uwe :lol:
Please try this code.

Code: Select all

   oBrw:nArrayAt := 3
   oBrw:nRowSel  := 3

Posted: Wed Mar 12, 2008 8:24 am
by Silvio
Dear ukoenig,
Do you think about .... gradient titlebar?
Only few fwusers use these classes...
you must create an utility for all Not for few..