Aplication with FWHMysqlMariaDb

Aplication with FWHMysqlMariaDb

Postby jose_murugosa » Wed Dec 14, 2016 8: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
FWH + Harbour + Bcc7. Una seda!
User avatar
jose_murugosa
 
Posts: 1144
Joined: Mon Feb 06, 2006 4:28 pm
Location: Uruguay

Re: Aplication with FWHMysqlMariaDb

Postby nageswaragunupudi » Thu Dec 15, 2016 1: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: Select all  Expand view

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: Select all  Expand view

@ 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: Select all  Expand view

      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
User avatar
nageswaragunupudi
 
Posts: 10253
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Enrico Maria Giordano, Otto and 13 guests