B4J Question How to change B4XImage position ?

CR95

Active Member
Licensed User
Following code does not work (for me) :
B4X:
Private CRTest As B4XImageView
....
Dim H As Double = 700     
CRTest.mBase.Top =  H
Image stays to the position declared in IDE

Additionnnaly, what is the purpose of the "update" function : B4XmageView.Update ?
 

teddybear

Well-Known Member
Licensed User
Following code does not work (for me) :
B4X:
Private CRTest As B4XImageView
....
Dim H As Double = 700   
CRTest.mBase.Top =  H
Image stays to the position declared in IDE

Additionnnaly, what is the purpose of the "u pdate" function : B4XmageView.Update ?
Try adding sleep before set top
B4X:
sleep(10)
CRTest.mBase.Top =  H
This update renders images according to the resizemode.
 
Last edited:
Upvote 0

CR95

Active Member
Licensed User
Thanks TeddyBear.
It works with "your" additionnal Sleep
However, the "click" or the "MouseClicked" events are not fired. Do you know if it is supported ?
Because I also found that LucasMS developed an additional library for this ImageView :
https://www.b4x.com/android/forum/threads/b4x-b4xlib-lmb4ximageview.128133/
and Lucas says that his library manages
- Click event
- classic properties: Left, Top, Width, Height.
I installed it but I don't knox how to use it
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Thanks TeddyBear.
It works with "your" additionnal Sleep
However, the "click" or the "MouseClicked" events are not fired. Do you know if it is supported ?
Because I also found that LucasMS developed an additional library for this ImageView :
https://www.b4x.com/android/forum/threads/b4x-b4xlib-lmb4ximageview.128133/
and Lucas says that his library manages
- Click event
- classic properties: Left, Top, Width, Height.
I installed it but I don't knox how to use it
B4X:
Dim xBmp As B4XBitmap
xBmp = xui.LoadBitmap(...) ' See the Editor help for parameters.
'or
xBmp = xui.LoadBitmapResize(...)
lmB4XImageView1.Bitmap = xBmp
1784228066482.png


Or...
For almost all objects you can do the following, the editor shows you the members of the object, even the events:

B4J_HmWCeo8JkS.gif
 
Upvote 0
Top