FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Aplication with FWHMysqlMariaDb
Posts: 1279
Joined: Mon Feb 06, 2006 04:28 PM
Aplication with FWHMysqlMariaDb
Posted: Wed Dec 14, 2016 08:18 PM

Mr. Rao

I'm finishing my first little app with fwhmysql , now I'm working with the details...

It works perfectly, and I just have to finish details of the user interface, I now my question is not new, there is something about this somewhere in forum but I didn't find it.

The thing is: I want to open a xBrowse with for example a recordset of 20 rows of Clients table and I want to have down in the xbrowse for example: 'Row 12/12500' where 12 is the line where I am and 12500 is total rows in the table, I'm using autoexpand.

How can I do this?

I have to use footers for that... or is there a better way?

Thanks in advance for your help.

Saludos/Regards,

José Murugosa

"Los errores en programación, siempre están entre la silla, el teclado y la IA!!"
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Aplication with FWHMysqlMariaDb
Posted: Thu Dec 15, 2016 01:11 AM
Wherever we display, the message is :
"Row " + cValToChar( oBrw:KeyNo ) + "/" + cValToChar( oBrw:nLen )

Display in footer:

If we display as footer, it looks nice if it is the footer of the first column. This is possible if the first column is wide enough to accommodate the width of the message. In that case, please do

Code (fw): Select all Collapse
oBrw:lFooter := .t.  // or better use FOOTERS clause in XBROWSE command
oBrw:aCols[ 1 ]:bFooter := { || "Row " + cValToChar( oBrw:KeyNo ) + "/" + cValToChar( oBrw:nLen ) }

oBrw:bChange := { || oBrw:oCol( 1 ):RefreshFooter() }


Display below the browse:

Next best place is to display in the dialog/window just below the browse as Say.
Code (fw): Select all Collapse
@ row,col SAY oSay PROMPT "Row " + cValToChar( oBrw:KeyNo ) + "/" + cValToChar( oBrw:nLen ) PIXEL SIZE w,h OF oDlg
oBrw:bChange := { || oSay:Refresh() }


Display RowNo and Total Rows on RecordSelector.

Code (fw): Select all Collapse
      WITH OBJECT oBrw
         :lFooter          := .t.
         :bRecSelHeader    := { || "RowNo" }
         :bRecSelData      := { |o| o:KeyNo }
         :bRecSelFooter    := { |o| o:nLen }
         :oRecSelFont      := oFont  // optional
         :nRecSelWidth     := "99999" // required size
      END
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion