hakha4 Member Licensed User Longtime User Feb 16, 2019 #1 Find this code from an older thread: Code: Copy 'state: 0 - normal, 1 - highlighted, 2 - disabled Sub SetBackgroundImage(b As Button, bmp As Bitmap, state As Int) Dim no As NativeObject = b no.RunMethod("setBackgroundImage:forState:", Array(bmp, state)) End Sub When compiling results in 'unknown type Nativeobject' What library? is missing Regards
Find this code from an older thread: Code: Copy 'state: 0 - normal, 1 - highlighted, 2 - disabled Sub SetBackgroundImage(b As Button, bmp As Bitmap, state As Int) Dim no As NativeObject = b no.RunMethod("setBackgroundImage:forState:", Array(bmp, state)) End Sub When compiling results in 'unknown type Nativeobject' What library? is missing Regards
DonManfred Expert Licensed User Longtime User Feb 16, 2019 #2 I think NativeObject is a B4i Object. In B4A you should use JavaObject i guess. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Feb 17, 2019 #3 This is a B4i code. It will not work on B4A. Upvote 0
hakha4 Member Licensed User Longtime User Feb 17, 2019 #4 My mistake! Found a solution in beginners guide Upvote 0