Question about xBrowse

Post Reply
User avatar
Armando
Posts: 3271
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México
Been thanked: 2 times
Contact:

Question about xBrowse

Post by Armando »

kindly friends:

With the code below I know the current value of the cell

Code: Select all | Expand

:bOnChange  := { |oCol, uOldVal| VerSaldo(uOldVal) }
 
Now how do I know the new value after editing the cell?

I must compare the old content against the new content
and I must know if the new content is empty

With best regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: Question about xBrowse

Post by nageswaragunupudi »

Now how do I know the new value after editing the cell?

Code: Select all | Expand

oCol:Value
Notes:
Do not use this for validation. This is called when the modified data is already written and also if the old data is different from the new data written.
This codeblock is meant for taking consequential action after modification of data in the cell but not for validation.
Regards

G. N. Rao.
Hyderabad, India
User avatar
Armando
Posts: 3271
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México
Been thanked: 2 times
Contact:

Re: Question about xBrowse

Post by Armando »

Mr. Rao:

Thanks so much, I understood.

By the way, is it possible to paste what I have on the clipboard into a cell with just one mouse click?

Best regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
Marc Venken
Posts: 1485
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Question about xBrowse

Post by Marc Venken »

Code: Select all | Expand

    

 oBrwmail:bRClicked := { || placemail() }

function placemail
    cText = oClp:getText()  //  This is content of clipboard
    testmail->(dbappend())
    testmail->email = cText
    obrwmail:refresh()
return
You can also use the varput and do it in Xbrowse itself
Marc Venken
Using: FWH 23.08 with Harbour
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: Question about xBrowse

Post by nageswaragunupudi »

Marc Venken wrote:

Code: Select all | Expand

    

 oBrwmail:bRClicked := { || placemail() }

function placemail
    cText = oClp:getText()  //  This is content of clipboard
    testmail->(dbappend())
    testmail->email = cText
    obrwmail:refresh()
return
You can also use the varput and do it in Xbrowse itself
Dear Friend.
With FWH you do not have to write long code like this at all.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: Question about xBrowse

Post by nageswaragunupudi »

By the way, is it possible to paste what I have on the clipboard into a cell with just one mouse click?
Yes.
Just by clicking Ctrl-V.

For this we first need to set

Code: Select all | Expand

oBrw:lCanPaste := .t.
We can paste text into text fields and even images into Image fields.
All by just one click Ctrl-V.

Code: Select all | Expand

function XbrPaste()

   local aData := { { "olga     ", MEMOREAD( "c:\fwh\bitmaps\olga1.jpg" ) }, ;
                    { "Two      ", "" }, { "Three      ", "" } }

   XBROWSER aData FASTEDIT SETUP ( ;
      oBrw:lCanPaste    := .t., ;
      oBrw:nRowHeight   := 100, ;
      oBrw:aCols[ 2 ]:cDataType:= "P" )

return nil
Image
Regards

G. N. Rao.
Hyderabad, India
User avatar
Armando
Posts: 3271
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México
Been thanked: 2 times
Contact:

Re: Question about xBrowse

Post by Armando »

Mr. Rao:

Thanks a lot.

Regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Post Reply