update the screen

Fox

Active Member
Licensed User
Longtime User
hey guys how can i update my current screen if i change an option i would draw a new picture in my imageview object. but at me i must first restart the program that the changes are working. My question is anyone a solution for me or know how can i update my current screen refreshing?
 

Fox

Active Member
Licensed User
Longtime User
Hey Fox,

Use the .invalidate option to refresh.

hmm not working at me i have following code:

Sub spnChange_ItemClick (Position As Int, Value As Object)
DateIndex(1) = Position
If DateIndex(0) > Position Then
DateIndex(0) = Position
spnDate0.SelectedIndex = Position
End If
Calc
End Sub


Sub Calc
If auswertungmusic.Text <= 6 AND auswertungmusic.Text => 5 Then
ImageView1.Visible = True
lbl_middle.Visible = True
lbl_h1.Visible = True
lbl_date.Visible = True
lbl_time.Visible = True
lbl_Settings.Visible = True
ImageView1.Bitmap = LoadBitmap(File.DirAssets, "red.png")

Else If auswertungmusic.Text >= 6 AND auswertungmusic.Text <= 7 Then
ImageView1.Visible = True
ImageView1.Visible = True
lbl_middle.Visible = True
lbl_h1.Visible = True
lbl_date.Visible = True
lbl_time.Visible = True
lbl_Settings.Visible = True
ImageView1.Bitmap = LoadBitmap(File.DirAssets, "blue.png")
End sub

and i would everytime the user change and the spinner i would draw the new image but all my tries with invalidate failed. Anyone an solution for me?
 
Upvote 0

Fox

Active Member
Licensed User
Longtime User
There is no need to call ImageView.Invalidate after changing the Bitmap property.

How did you add ImageView1?

hy this is the code i have:

If lbl_a.Text <= 6 AND lbl_a.Text => 5 Then
ImageView1.Visible = True
ImageView1.Bitmap = LoadBitmap(File.DirAssets, "pic1.png")
ImageView1.Invalidate
lbl_b.Text = "Nice"

and nothing work...

when i must call the Activity.Invalidate ??? After i have Invalidate the image?
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
You should post either your project as a zip file or at least a small test program that shows the problem.
Otherwise it is not possible to help you.
Just a few partial code snippets are not sufficent.
I already asked for this in the german forum without any answer from you.
I really don't understand why you don't want to give us more information on what you did and how.
Too often the problem is not where you think it is but somewhere else and for that we need the whole environment.

Best regards.
 
Upvote 0
Top