'MyCustomClass
sub initialize(parameters)
for i=1 to 5
private btn as b4xview
private b as button
private btn as b4xview=b
mbase.add(btn,0,0,80dip,80dip)
btn.text="HelloWorld"
btn.width=-2 'set the width to fit the text length'
next
end sub
private sub getActualWidth
private b as mbase.getview(3)
reflector.Target=b
private ActualWidth as int= reflector.RunMethod("getWidth")
log(ActualWidth) ' having no clue why the output is always 0
end sub