CheckBox in a column xbrowse

CheckBox in a column xbrowse

Postby hag » Mon Apr 19, 2010 3:39 pm

I have an xbrowse that I need to mark serveral records to change their currency. I thought of having a column of check boxes. The user can check off as many records as the like then convert to the currency those that are checked.

The browse is NOT from code.

I'm looking for some xbrowse code or direction where I can read up on the subject. Thanks all.

Using Harbour
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Re: CheckBox in a column xbrowse

Postby sambomb » Mon Apr 19, 2010 8:20 pm

http://www.fivewin.com.br/forum/topic.a ... C_ID=17222

A link to the same question in the brazilian forum
Email: SamirSSabreu@gmail.com
xHarbour 1.2.3 + Fwhh 20.2
User avatar
sambomb
 
Posts: 388
Joined: Mon Oct 13, 2008 11:26 am
Location: Itaocara - RJ - Brasil

Re: CheckBox in a column xbrowse

Postby nageswaragunupudi » Tue Apr 20, 2010 12:42 am

Mr Hag
Probably this sample code may be the starting point for you.
Code: Select all  Expand view
#include 'fivewin.ch'
#include 'xbrowse.ch'

function Main()

   local oDlg, oBrw, oFont
   local nExch := 1.348
   local aData := { ;
         { 'One',    .t.,  1000 }, ;
         { 'Two',    .f.,  2000 }, ;
         { 'Three',  .t.,  3000 }, ;
         { 'Four',   .f.,  4000 }  }

   DEFINE FONT oFont NAME 'TAHOMA' SIZE 0,-14
   DEFINE DIALOG oDlg RESOURCE 'TEST' FONT oFont

   REDEFINE XBROWSE oBrw ID 101 OF oDlg ;
      AUTOCOLS ;
      ARRAY aData ;
      HEADERS 'Customer', 'Euros', 'Amount' ;
      PICTURES nil, nil, '999,999.99' ;
      CELL LINES

   WITH OBJECT oBrw:Euros
      :SetCheck( , .t. )
      :bOnChange  := { || If( oBrw:Euros:Value, oBrw:Amount:Value /= nExch, oBrw:Amount:Value *= nExch ), ;
                              oBrw:RefreshCurrent() }
   END

   oBrw:nStretchCol  := STRETCHCOL_WIDEST

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

return nil
 


RC File
Code: Select all  Expand view
TEST DIALOG 6, 15, 306, 227
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "TXBrowse demo"
FONT 8, "MS Sans Serif"
{
 DEFPUSHBUTTON "OK", IDOK, 252, 211, 50, 14
 CONTROL "", 101, "TXBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP, 4, 5, 297, 202
}
 


ScreenShot:
Image
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10627
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: CheckBox in a column xbrowse

Postby hag » Tue Apr 20, 2010 2:54 am

Great stuff thanks to both.
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], Marc Venken and 103 guests