Error 403 from Google Calendar? Upgrade to the new Google Calendar support. See here for details. close
Welcome, Guest
Please Login or Register.    Lost Password?

How to change the image on a button
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: How to change the image on a button
#8703
How to change the image on a button 5 Years, 10 Months ago  
I am having trouble calling the SetItemValue api. I have a button on a Todo list and I pass the ('#SKIN#', '#ID#', #GUID#, #COUNT#) into a function. I am trying to change the image on the button when it is pressed. I have attached the skin. Any help would be greatly appreciated.
I sent the skin to the Support email address.
Southward
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
Gender: Male
Last Edit: 2009/02/01 09:29 By Southward.
The administrator has disabled public write access.
 
#8729
Re:How to change the image on a button 5 Years, 10 Months ago  
Get the build 71 and try something like this:

Code:


      todolist id="Todo List.todolist" origin1="TOP-LEFT" x1="0" y1="0" origin2="BOTTOM-RIGHT" x2="0" y2="0">
        item>
          appearance padding="10,0,0,3" element="font.normal" color="255,255,255,255" effect="NORMAL" align="TOP-LEFT" />
          button id="Todo List.item.button" element="bitmap.checkbox.checked" origin="TOP-LEFT" x="0" y="0" action="Shadow4_Todo_Toggle(#WINDOW#, #COUNT#)" />
        /item>
      /todolist>



Code:


function Shadow4_Todo_Toggle(window, count)
value = Rainlendar_GetItemValue("Todo List", "Todo List.item.button." .. count, "element"«»)
if (value == "bitmap.checkbox.checked"«») then
   Rainlendar_SetItemValue("Todo List", "Todo List.item.button." .. count, "element", "bitmap.checkbox.unchecked"«»)
else
   Rainlendar_SetItemValue("Todo List", "Todo List.item.button." .. count, "element", "bitmap.checkbox.checked"«»)
end

  Rainlendar_Redraw(0, window)
end

Rainy
Moderator
Posts: 6092
graph
User Offline Click here to see the profile of this user
Last Edit: 2009/02/01 10:45 By Rainy.
The administrator has disabled public write access.
 
#8746
Re:How to change the image on a button 5 Years, 10 Months ago  
Thanks!
Southward
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
Gender: Male
The administrator has disabled public write access.
 
#9293
Re:How to change the image on a button 5 Years, 9 Months ago  
I have my skin working fairly well, but I am having a problem with the #Count#. If I delete an item from the Todo list and then click on the last item in the list I get the following error in the log file. It appears the count value of the list items is not recalculated if one is deleted.

WARNING: Lua_SetItemValue(): Unable to find item Todo List.item.time.3 from window "Todo List".

I found references to a Duration property in the ICal spec. Would it be possible to support this property? Could Duration be displayed in the Manager and exposed as a value of the todo item?
Thanks!
Southward
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
Gender: Male
The administrator has disabled public write access.
 
#9302
Re:How to change the image on a button 5 Years, 9 Months ago  
True, the #COUNT# doesn't get updated if the list changes. I'll fix that.

Rainlendar uses the DTEND property (or DUE for tasks) to define the end of the item and the DURATION property cannot be used at the same time.
Rainy
Moderator
Posts: 6092
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
get the latest posts directly to your desktop