Tayfur Well-Known Member Licensed User Longtime User Oct 30, 2018 #1 Hi @Erel; is it possible ; i need using for old libs. Code: private B4Xcnvs as B4XCanvas private cnvs as Canvas cnvs=B4Xcnvs.getCanvas
Hi @Erel; is it possible ; i need using for old libs. Code: private B4Xcnvs as B4XCanvas private cnvs as Canvas cnvs=B4Xcnvs.getCanvas
Erel B4X founder Staff member Licensed User Longtime User Oct 30, 2018 #2 You can get it with: Code: 'B4J and B4A Sub GetNativeCanvas (b4x As B4XCanvas) As Canvas Dim jo As JavaObject = b4x jo = jo.GetFieldJO("cvs") If XUI.IsB4J Then Return jo.RunMethod("getObject", Null) Return jo End Sub Last edited: Jan 29, 2019
You can get it with: Code: 'B4J and B4A Sub GetNativeCanvas (b4x As B4XCanvas) As Canvas Dim jo As JavaObject = b4x jo = jo.GetFieldJO("cvs") If XUI.IsB4J Then Return jo.RunMethod("getObject", Null) Return jo End Sub
Tayfur Well-Known Member Licensed User Longtime User Oct 30, 2018 #3 Erel said: You can get it with: Code: 'B4J and B4A Sub GetNativeCanvas (b4x As B4XCanvas) As Canvas Dim jo As JavaObject = b4x Return jo.GetFieldJO("cvs").RunMethod("getObject", Null) End Sub Click to expand... Thanks @Erel; can you add ??? "SetNativeCanvas(cvs as Canvas)" (updated SET) Last edited: Oct 30, 2018
Erel said: You can get it with: Code: 'B4J and B4A Sub GetNativeCanvas (b4x As B4XCanvas) As Canvas Dim jo As JavaObject = b4x Return jo.GetFieldJO("cvs").RunMethod("getObject", Null) End Sub Click to expand... Thanks @Erel; can you add ??? "SetNativeCanvas(cvs as Canvas)" (updated SET)
DonManfred Expert Licensed User Longtime User Oct 30, 2018 #4 Tayfur said: can you add ??? Click to expand... you can add this code to your project. Where is the problem???
Tayfur said: can you add ??? Click to expand... you can add this code to your project. Where is the problem???
Tayfur Well-Known Member Licensed User Longtime User Oct 30, 2018 #5 DonManfred said: you can add this code to your project. Where is the problem??? Click to expand... sooo sorryy, GetNativeCanvas is OK. I asked : SETnativeCanvas Maybe people need it.
DonManfred said: you can add this code to your project. Where is the problem??? Click to expand... sooo sorryy, GetNativeCanvas is OK. I asked : SETnativeCanvas Maybe people need it.
Erel B4X founder Staff member Licensed User Longtime User Oct 31, 2018 #6 A Set method is more problematic to add due to the way B4XCanvas is built.
Tayfur Well-Known Member Licensed User Longtime User Oct 31, 2018 #7 Erel said: A Set method is more problematic to add due to the way B4XCanvas is built. Click to expand... Thanks info.
Erel said: A Set method is more problematic to add due to the way B4XCanvas is built. Click to expand... Thanks info.