Question about xBrowse

Question about xBrowse

Postby Armando » Sun Aug 20, 2023 8:40 pm

kindly friends:

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

Code: Select all  Expand view  RUN

: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
Armando
 
Posts: 3230
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: Question about xBrowse

Postby nageswaragunupudi » Mon Aug 21, 2023 3:32 am

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


Code: Select all  Expand view  RUN
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
nageswaragunupudi
 
Posts: 10655
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Question about xBrowse

Postby Armando » Mon Aug 21, 2023 3:49 am

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
Armando
 
Posts: 3230
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: Question about xBrowse

Postby Marc Venken » Mon Aug 21, 2023 7:20 am

Code: Select all  Expand view  RUN
   

 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.04 with Harbour
User avatar
Marc Venken
 
Posts: 1446
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Question about xBrowse

Postby nageswaragunupudi » Mon Aug 21, 2023 10:22 am

Marc Venken wrote:
Code: Select all  Expand view  RUN
   

 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: 10655
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Question about xBrowse

Postby nageswaragunupudi » Mon Aug 21, 2023 10:25 am

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 view  RUN
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 view  RUN
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
nageswaragunupudi
 
Posts: 10655
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Question about xBrowse

Postby Armando » Mon Aug 21, 2023 4:31 pm

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
User avatar
Armando
 
Posts: 3230
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 29 guests