S sorex Expert Licensed User Longtime User Jan 29, 2014 #1 Hello, linked with this problem/thread http://www.b4x.com/android/forum/threads/button-with-icon-text.37240/#post-219531 I request additional padding options on buttons and maybe on other views where it might be usefull.
Hello, linked with this problem/thread http://www.b4x.com/android/forum/threads/button-with-icon-text.37240/#post-219531 I request additional padding options on buttons and maybe on other views where it might be usefull.
Erel B4X founder Staff member Licensed User Longtime User Jan 29, 2014 #2 Note that you can call setPadding with JavaObject: Code: Copy Sub SetPadding(v As View, Left As Int, Top As Int, Right As Int, Bottom As Int) Dim jo As JavaObject = v jo.RunMethod("setPadding", Array As Object(Left, Top, Right, Bottom) End Sub
Note that you can call setPadding with JavaObject: Code: Copy Sub SetPadding(v As View, Left As Int, Top As Int, Right As Int, Bottom As Int) Dim jo As JavaObject = v jo.RunMethod("setPadding", Array As Object(Left, Top, Right, Bottom) End Sub
S sorex Expert Licensed User Longtime User Jan 29, 2014 #3 I know but it would be handy if we could do it in the designer and that during compile the above code gets added if the padding is not filled in with the defailt value (not 0;0;0;0 apparently)
I know but it would be handy if we could do it in the designer and that during compile the above code gets added if the padding is not filled in with the defailt value (not 0;0;0;0 apparently)
stevel05 Expert Licensed User Longtime User Jan 29, 2014 #4 You can get the current padding values again using javaobject with Code: Copy LeftPadding = JO.Runmethod("getPaddingLeft",Null) And: getPaddingTop getPaddingRight getPaddingBottom getPaddingStart getPaddingEnd although the documentation isn't clear on the differences between Start and Left and End and Right.
You can get the current padding values again using javaobject with Code: Copy LeftPadding = JO.Runmethod("getPaddingLeft",Null) And: getPaddingTop getPaddingRight getPaddingBottom getPaddingStart getPaddingEnd although the documentation isn't clear on the differences between Start and Left and End and Right.
Dave O Well-Known Member Licensed User Longtime User Feb 6, 2015 #5 I second the suggestion to add padding as a property in the designer. Would be easier (obviously) and much more discoverable.
I second the suggestion to add padding as a property in the designer. Would be easier (obviously) and much more discoverable.