FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour XBrowse 16.04 : RecordSelector
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
XBrowse 16.04 : RecordSelector
Posted: Tue Apr 26, 2016 09:42 AM
Till now we could toggle display of Record Selector and set width of record selector. From FWH 16.04 we can display text, change or omit pointer bitmap, display text or icon in recsel header, text on recsel footer and assign action and/or popup menu on click on recsel header.

Following screen-shots show some of the possiblities and also the code required.

Text in header, body and footer of record selector:



Row captions on record selector and icon on header:


Excel like look:


Custom bitmap for record selector pointer and
Popup menu on click of recselctor icon.
Regards



G. N. Rao.

Hyderabad, India
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: XBrowse 16.04 : RecordSelector
Posted: Tue Apr 26, 2016 09:57 AM
WORDERFULL

MANY MANY CONGRATULATIONS
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 153
Joined: Tue Aug 05, 2014 09:48 AM
Re: XBrowse 16.04 : RecordSelector
Posted: Wed Apr 27, 2016 12:37 PM
Regards, Greetings



Try FWH. You will enjoy it's simplicity and power.!
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: XBrowse 16.04 : RecordSelector
Posted: Wed Apr 27, 2016 02:57 PM
GREAT extensions :-)

just a small correction possible ?

I added and prepared these options in my xbrowse-config-section.
I noticed only a part of the recordselector-area is repainted after a color-change at runtime.
Is it possible to fix it as well ?

The prepared xBrowse-selection-area



best regards
Uwe :-)
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.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: XBrowse 16.04 : RecordSelector
Posted: Wed Apr 27, 2016 03:07 PM

After you change record selector color during runtime, are you calling oBrw:Refresh() ?
I think oBrw:Refresh() should repaint fully with new color.
Please let me know.

Regards



G. N. Rao.

Hyderabad, India
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: XBrowse 16.04 : RecordSelector
Posted: Wed Apr 27, 2016 03:17 PM
Mr. Rao,

The color-change-button and browser-repaint
Everything is repainted, but for the selector-column, only the background of the selector-image-is changed.

---------------

REDEFINE BTNBMP oBtn[16] OF oDlg4 ;
ID 595 PIXEL 2007 ;
NOBORDER ;
PROMPT "&r) Ausw.Spalte" ;
FILENAME c_Pfad1 + "Paint1.Bmp" ;
ACTION ( aVal[107] := ChooseColor(aVal[107], 2 ), oBBmp[16]:Refresh(), ;
SHOW_XBRW( oBrw, aVal ) ) ;
FONT oFontSys ;
LEFT

// -- the BROWSER-update ( this function is called on any change to show the result )-------

FUNCTION SHOW_XBRW( oBrw, aVal )

oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROW
oBrw:nColDividerStyle := LINESTYLE_BLACK
oBrw:nRowDividerStyle := LINESTYLE_BLACK
oBrw:bClrStd := { || If( oBrw:KeyNo() % 2 == 0, ;
{ If( ( oBrw:cAlias )->( Deleted() ), 255, aVal[103] ), aVal[102] }, ;
{ If( ( oBrw:cAlias )->( Deleted() ), 255, aVal[101] ), aVal[100] } ) }
oBrw:bClrSel := ;
oBrw:bClrSelFocus := { || { If( ( oBrw:cAlias )->( Deleted() ), 255, aVal[105] ), aVal[104] } }
oBrw:nRecSelColor := aVal[107] // selector-col background
oBrw:lHScroll := .T.
oBrw:lVScroll := .T.
oBrw:lFooter := .T.
oBrw:nRowHeight := 25
oBrw:SetFont( oFontSys )

oBrw:Refresh()

RETURN NIL

----------------------

regards
Uwe :-)
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.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: XBrowse 16.04 : RecordSelector
Posted: Thu Apr 28, 2016 09:41 AM

Mr Uwe

Thanks for pointing out.
We shall take care of it before release.

Regards



G. N. Rao.

Hyderabad, India
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: XBrowse 16.04 : RecordSelector
Posted: Thu Apr 28, 2016 12:21 PM
Mr. Rao,

just a idea.
I don't know if it is possible somthing like

oBrw1:nRecSelColor := { IIF( ( oBrw1:cAlias )->( Deleted() ), 255, aVal[103] ) }
No need to show something in a extra column

like a condition can be defined in
oBrw:aCols[ 2 ]:bClrStd := {|| { aVal[101], aVal[100] } }



best regards
Uwe :-)
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.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: XBrowse 16.04 : RecordSelector
Posted: Thu Apr 28, 2016 12:27 PM

In other words, you are suggesting a codeblock for recordselector color also similar to bClrStd for a cell.
Nice suggestion, we shall look into this.

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion