XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently May 10th, 2025, 1:11 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: November 17th, 2012, 8:44 am 
Offline
User avatar

Joined: June 12th, 2012, 11:05 am
Posts: 257
Location: Barcelona
Qiancang:
It would be great if there were a "core holiday" or something ...
In the following example: I would like the background of the day change to red when that day is a holiday ...
Perhaps there is a way to make writing a code ... but I do not know how that would be.
Thank you for your feedback!
Attachment:
background day.jpg
background day.jpg [ 30.77 KiB | Viewed 2467 times ]


Top
 Profile  
 
PostPosted: November 17th, 2012, 6:58 pm 
Offline
User avatar

Joined: June 10th, 2012, 5:57 am
Posts: 313
a datetimecore is enough.
Code:
function datetimecore1OnUpdate(Sender)
{
  if(datetimecore1.get("%HolidayAll") != '')
  {
  text1.background.solidColor.color = rgba(255,0,0,255)
  image1.Src = "red.png";
  }

  else
  {
  text1.background.solidColor.color = rgba(0,0,0,255)
  image1.Src = widgetpath + "white.png"; // sometimes WidgetPath is necessary , you can delete it here
  }

}


you can write whatever you want in the if else body


Top
 Profile  
 
PostPosted: November 18th, 2012, 5:18 am 
Offline
User avatar

Joined: June 12th, 2012, 11:05 am
Posts: 257
Location: Barcelona
Qiancang.... Thanks so much!!!! I will try your code.
It's very useful!!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 91 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB® Forum Software © phpBB Group