B4J Question B4XView Snapshot

hanyelmehy

Active Member
Licensed User
i use this code ,but saved image have nothing
B4X:
Private pnDraw As B4XView
pnDraw.SetLayoutAnimated(0, 0, 0,600,600)
pnDraw.LoadLayout("CartImg1")
'add test to layout'
Dim Out2 As OutputStream
Out2 = File.OpenOutput(WorkPath,"file-name".jpg", False)
pnDraw.Snapshot.WriteToStream(Out2,80,"JPEG")
Out2.Close
 

hanyelmehy

Active Member
Licensed User
-it's a big project it well be difficult to split code
- file-name".jpg just to explain issue
-when change pnDraw from B4XView to Pane Snapshot work ,but it capture only (B4XImageView with images) ,labels not captured
-when test same code on real form ,every thing show correctly ,and when use (RootPane.Snapshot) ,every thing captured
 
Upvote 0
Top