iOS Question B4xRotary problem with Designer Script

james_sgp

Active Member
Licensed User
Hi, my B4i app keeps crashing at the Designer Script when using the B4XRotary class; trying to set Left/Top/Width. If I put the Left & Top positions into my code its ok, but I cant put width there either without the app crashing; but wondering why I`m getting this problem.

James
 

james_sgp

Active Member
Licensed User
Guys, please give me an experts comments on this 'workaround' I`m trying:

B4X:
....Application_Start....
    rotary1.Initialize("rotary1","rotary1")
    rot_dims(0) = 52%x
    rot_dims(1) = 32%y
    rot_dims(2) = 37%x
    make_rot
End Sub

Sub make_rot
    rotary1.AddToParent(main_pnl,rot_dims(0),rot_dims(1),rot_dims(2),rot_dims(2))'52%x,35%y,37%x,37%x)
    rotary1.KnobBorderColor = Colors.Black
    rotary1.BackgroundColor = Colors.Black
    rotary1.KnobColor = Colors.ARGB(255,108,108,108)
    rotary1.LineColor = Colors.White
    rotary1.TextColor = Colors.ARGB(255,135,135,135)
    rotary1.HighlightTextColor = Colors.ARGB(255,135,135,135)
    rotary1.ScaleNbValues = 17
    rotary1.ScaleMinValue = -8
    rotary1.ScaleMaxValue = 8
    rotary1.OffsetAngle = 45
    rotary1.Value = 120
    ImageView6.bringtofront
End Sub

It seems to scale properly and work when the screen is regenerated (B4XLocalizator)...
But "rotary1_ValueChanged(Value As Int)" event isnt firing, is there any suggestions; this is the first time I`m adding a control programmatically?

James
 
Upvote 0
Top