I have the following code to toggle the online/offline state, and I also link in the availability of the refresh button with this state, ie if offline, we can't refresh weather/rss data.
region,7,0,-1
imagebutton,132,3,offline.png,t,0,30,,0,7,8,9,10
button,132,3,11,11,7,4,1
endregion,7,0
region,7,1,-1
imagebutton,132,3,online.png,t,0,31,,0,7,8,9,10
button,132,3,11,11,7,4,0
imagebutton,146,3,refresh.png,t,0,7,,-1
endregion,7,1
Initially we are offline, so we only see my offline button and no refresh. Then, once I have clicked the button we are online and the refresh button is visible. However, when I click again to say we are now offline, the refresh button image remains, although it is not clickable. What am I missing?
Incidentally, I have now tried this with a full rerender, and it works okay, but would like to find a more efficient way to do it, ie
region,7,0,-1
imagebutton,132,3,offline.png,t,0,30,,0,7,8,9,10
button,132,3,11,11,7,4,1,-1
endregion,7,0
I'm almost positive that region 7 doesn't have the correct dimensions defined in the defregion, which is why when you do a refresh of region 7, the area region 7 occupies doesn't get cleared properly.
Quote from: srsI'm almost positive that region 7 doesn't have the correct dimensions defined in the defregion, which is why when you do a refresh of region 7, the area region 7 occupies doesn't get cleared properly.
You're absolutely right. This
was the definition for region 7:
defregion,7,0,0,0,0,2Of course, I expected your code to
magically know that I wanted to refresh just the two buttons in that region. Sheesh! :wink:
all mind reading and magic will be reserved for version 2 (after all I gotta save something for version 2) :P
I dunno, this whole thing feels a bit like magic right now. I've not had so much fun since I got my first Pocket PC. Thanks again.