Hi all.
I have this code working brilliantly in a "standard VO" Browse View:
METHOD CellDoubleClick() CLASS DataBrowser
LOCAL MyEditWindow as JobNoRep
Local nRecNo
nRecNo := RECNO()
self:oDataServer:GoTo(nRecNo)
self:oDataServer:FIELDGET(#JobDate)
MyEditWindow := JobNoRep{,,self:oDataServer,nRecNo}
MyEditWindow:SERVER:GoTo(nRecNo)
MyEditWindow:Show(SHOWCENTERED)
self:owner:owner:Endwindow()
RETURN nil
How do I achieve the exact same result (same screen called etc) in bBrowser please? All I mostly get is the attached message, which really tells me bugger all. I read in the "old" vo forum a few things about a known issue but haven't found any solution as yet. Hitting "Debug" locks VO up completely...
Thanks again.
Jeff
What's the trick to CellDoubleClick() in bBrowser?
What's the trick to CellDoubleClick() in bBrowser?
- Attachments
-
- Capture.JPG (21.52 KiB) Viewed 446 times
What's the trick to CellDoubleClick() in bBrowser?
Hi Jeff,
you have to use the Recno() method of the bBrowsers server, open up a new server instance and move on this record.
Probably closing the bBrowser window closes also the related server.
And please don't forget that the bBrowser server can be also the server of the window itself, but in many cases it will not be.
I'm using similar code:
But this code is not closing the browser window (and I do this never, but let it open or hide it temporarily).
Wolfgang
you have to use the Recno() method of the bBrowsers server, open up a new server instance and move on this record.
Probably closing the bBrowser window closes also the related server.
And please don't forget that the bBrowser server can be also the server of the window itself, but in many cases it will not be.
I'm using similar code:
Code: Select all
method CellDoubleClick( oEvent ) class MAuftragSubEdit7
local oEdit as MAufKostDialog
if oDCMAufKostGrid:Server != null_object .and. oDCMAufKostGrid:Server:EOF == false
oEdit := MAufKostDialog{ self:Owner:Owner, oDCMAufKostGrid:Server }
oEdit:Show( SHOWCENTERED )
endif
return nil
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
-
- Posts: 50
- Joined: Fri Feb 16, 2018 7:52 am
What's the trick to CellDoubleClick() in bBrowser?
Hi Jeff,
If you are doing it like this (bBrowser as a replacement browser in datawindow BrowseView)
https://groups.google.com/forum/?hl=sv& ... 6PaB_ZqiMJ
you can use the CellDoubleClick Event in the datawindow like Wolfgang showed you. If you have an inherited bBrowser class you can do something like;
method MouseButtonDoubleClick(oMouseEvent) class bInheritedBrowser
local oP as Point
local oC as bCell
local oCol as bDataColumn
if self:lInProcess
return ISEXECUTED
endif
if oMouseEvent:IsLeftButton
oP := Point{LoWord(oMouseEvent:LParam),HiWord(oMouseEvent:LParam)}
oC := self:GetCellToPoint(oP)
oCol := self:GetOpenColumn(oC:column)
if !Empty(oCol) .and. InList(oCol:fieldsym,#IDEL,#PDEL,#BDEL)
self:owner:DoSomething() // On the datawindow owner
self:EventReturnValue := ISEXECUTED
return self:EventReturnValue
endif
endif
return super:MouseButtonDoubleClick(oMouseEvent)
//Mathias
If you are doing it like this (bBrowser as a replacement browser in datawindow BrowseView)
https://groups.google.com/forum/?hl=sv& ... 6PaB_ZqiMJ
you can use the CellDoubleClick Event in the datawindow like Wolfgang showed you. If you have an inherited bBrowser class you can do something like;
method MouseButtonDoubleClick(oMouseEvent) class bInheritedBrowser
local oP as Point
local oC as bCell
local oCol as bDataColumn
if self:lInProcess
return ISEXECUTED
endif
if oMouseEvent:IsLeftButton
oP := Point{LoWord(oMouseEvent:LParam),HiWord(oMouseEvent:LParam)}
oC := self:GetCellToPoint(oP)
oCol := self:GetOpenColumn(oC:column)
if !Empty(oCol) .and. InList(oCol:fieldsym,#IDEL,#PDEL,#BDEL)
self:owner:DoSomething() // On the datawindow owner
self:EventReturnValue := ISEXECUTED
return self:EventReturnValue
endif
endif
return super:MouseButtonDoubleClick(oMouseEvent)
//Mathias
What's the trick to CellDoubleClick() in bBrowser?
Brilliant! Thanks very much Mathias and Wolfgang! Very much appreciated..... again!