FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to ?
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
How to ?
Posted: Mon Jan 24, 2011 03:00 AM

Guys:

How can I have an xBrowse with a column that the user can mark / unmark records that he/she has selected ? I need to do this without adding a field to the database. Thank you.

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: How to ?
Posted: Mon Jan 24, 2011 05:36 AM
Please add these two lines
Code (fw): Select all Collapse
   oBrw:Marked    := { ||AScan( oBrw:aSelected, { |n| n == oBrw:BookMark } ) > 0 }
   oBrw:Marked:SetCheck()  // if display is expected as checkbox

I expect that you are using
Code (fw): Select all Collapse
      :nMarqueeStyle          := MARQSTYLE_HIGHLROWMS
to allow Multiple Selection.
Regards



G. N. Rao.

Hyderabad, India
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: How to ?
Posted: Mon Jan 24, 2011 06:04 AM

Nageswaragunupudi:

Thank you for your help. Is oBrw:marked a xBrowse data and SetCheck() a method ? Can you provide a small example because I can't find documentation on marked and SetCheck() ?

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: How to ?
Posted: Mon Jan 24, 2011 06:56 AM

Is this solution working for you?

There is no xbrowse data "Marked".
There is a feature of xbrowe to add new columns with much ease.

oBrw:<ColName> := bCodeBlock creates and adds a new column with the codeblock and <colname> as the header.

By writing oBrw:Marked := { || .... }, we added a new column with header "Marked" whose value is ascertained by the codeblock we provided. This is a short cut to ADD COLUMN method,

By writing oBrw:Marked:SetCheck() we called the method SetCheck() for the column named "Marked" of the browse.

Regards



G. N. Rao.

Hyderabad, India
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: How to ?
Posted: Mon Jan 24, 2011 08:19 AM

Rao:

Thanks, how can I filter an xBrowse so I can include records matching a criteria ?

Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: How to ?
Posted: Mon Jan 24, 2011 08:22 AM

Rao:

Where I can find all the data & methods that xBrowse supports ? It seems that the manual does not show all options. FiveWin 10.06

Continue the discussion