XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently May 1st, 2025, 3:04 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Calendar font color
PostPosted: March 28th, 2017, 2:48 am 
Offline
User avatar

Joined: July 24th, 2016, 3:19 am
Posts: 9
i can change some calendar font color like DaysFont & WeekFont color with script code, but i dont know how to change WeekEndDays Color with script code . . . :cry:
can someone help me please . . . :D

Original

Image

function RedOnClick(Sender)
{
Calendar.DaysFont.Color = rgba(255,0,0,255);
Calendar.WeekFont.Color = rgba(255,0,0,255);
}

Image

function GreenOnClick(Sender)
{
Calendar.DaysFont.Color = rgba(0,255,0,255);
Calendar.WeekFont.Color = rgba(0,255,0,255);
}

Image


Attachments:
Help - Calendar.xwp [160.2 KiB]
Downloaded 678 times

_________________
My deviantart = http://adiim.deviantart.com
Top
 Profile  
 
 Post subject: Re: Calendar font color
PostPosted: March 28th, 2017, 5:53 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
I don't know the answer but have you tried to use 'WeekEndDays' or a similar word with the same script..?

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
 Post subject: Re: Calendar font color
PostPosted: March 28th, 2017, 6:07 am 
Offline
User avatar

Joined: July 24th, 2016, 3:19 am
Posts: 9
yes Jim, i already try word like "WeekEndDays", "WeekDays", "EndDays", but always compile error . . . :(
so hard to find the right word, because Calendar class not available on auto complete script code list . . . ( ͡ ͡° ͜ ʖ ͡ ͡°)

_________________
My deviantart = http://adiim.deviantart.com


Top
 Profile  
 
 Post subject: Re: Calendar font color
PostPosted: March 28th, 2017, 7:20 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
I see.. I will take a look and reply if I found the right form :)

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
 Post subject: Re: Calendar font color
PostPosted: March 28th, 2017, 7:38 am 
Offline
User avatar

Joined: July 24th, 2016, 3:19 am
Posts: 9
thanks jim, i'll be waiting . . . :D

_________________
My deviantart = http://adiim.deviantart.com


Top
 Profile  
 
 Post subject: Re: Calendar font color
PostPosted: March 28th, 2017, 8:16 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
Adiim wrote:
thanks jim, i'll be waiting . . . :D

I'm searching..
Another way though is to create two calendars (make one with all red and one all green) and use the show/hide function.
You will have the same result ;)

Use this script: (you need to edit it according your design - components)
Code:
function menuitem1OnClick(Sender)
{
  wood.visible = true;
  metal1.visible = false;
  setValue('wood.visible',wood.Visible);
  setValue('metal1.visible',metal1.Visible);
  saveIni;
  menuitem1.checked = wood.visible;
  menuitem2.checked = metal1.visible;
}

function menuitem2OnClick(Sender)
{
  wood.visible = false;
  metal1.visible = true;
  setValue('wood.visible',wood.Visible);
  setValue('metal1.visible',metal1.Visible);
  saveIni;
  menuitem1.checked = wood.visible;
  menuitem2.checked = metal1.visible;
}


function widgetOnLoad()
{
  wood.Visible = getValue('wood.visible',wood.Visible);
  metal1.Visible = getValue('metal1.visible',metal1.Visible);

  menuitem1.checked = wood.Visible;
  menuitem2.checked = metal1.Visible;
}


You can use it for "click on" actions and right click menus/selection
Example:
http://jimking.deviantart.com/art/METEO ... -418174137

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
 Post subject: Re: Calendar font color
PostPosted: March 28th, 2017, 6:23 pm 
Offline
User avatar

Joined: July 24th, 2016, 3:19 am
Posts: 9
well, i already try to create 2 calendar jim, but i want know how to change calendar font color with script code . . . :D
its ok, maybe XWidget next update, calendar function available on auto complete script code . . . :D

_________________
My deviantart = http://adiim.deviantart.com


Top
 Profile  
 
 Post subject: Re: Calendar font color
PostPosted: March 28th, 2017, 10:58 pm 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
I'm sure that there is a way to do it. We just need to find the right form. js is very sensitive and one letter can do the trick. I sent you the alternative way to finish your widget. ;)

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


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

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 3 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:  
cron

Powered by phpBB® Forum Software © phpBB Group