JOFA666 Member Licensed User Longtime User Oct 4, 2013 #1 I am using a button and modifying the background image when the Down, Up and Click event occurs. The problem I am encountering is serious lag. It takes some considerable time for the background image to change, making the program feel very, very laggy. The code looks as follows: Code: Sub ButtonDot1_Down If ButtonDot1Selected = True Then ButtonDot1.SetBackgroundImage(LoadBitmap(File.DirAssets, "ButtonSelectedDown.png")) Else ButtonDot1.SetBackgroundImage(LoadBitmap(File.DirAssets, "ButtonDown.png")) End If End Sub Similar code is used for the Up and Click events. I wanted to originally use an ImageView for this, but it does not support Up and Down events. Thus, my question is, can I somehow overcome this lag, or is there a better option that I am missing?
I am using a button and modifying the background image when the Down, Up and Click event occurs. The problem I am encountering is serious lag. It takes some considerable time for the background image to change, making the program feel very, very laggy. The code looks as follows: Code: Sub ButtonDot1_Down If ButtonDot1Selected = True Then ButtonDot1.SetBackgroundImage(LoadBitmap(File.DirAssets, "ButtonSelectedDown.png")) Else ButtonDot1.SetBackgroundImage(LoadBitmap(File.DirAssets, "ButtonDown.png")) End If End Sub Similar code is used for the Up and Click events. I wanted to originally use an ImageView for this, but it does not support Up and Down events. Thus, my question is, can I somehow overcome this lag, or is there a better option that I am missing?
Erel B4X founder Staff member Licensed User Longtime User Oct 4, 2013 #2 You should instead set the two images with the designer. You do not need to handle these events. Upvote 0