XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently 2017年 Aug 21日 19:39

All times are UTC - 8 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Calendar font color
PostPosted: 2017年 Mar 28日 02:48 
Offline
User avatar

Joined: 2016年 Jul 24日 03:19
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 18 times

_________________
My deviantart = http://adiim.deviantart.com
Top
 Profile  
 
 Post subject: Re: Calendar font color
PostPosted: 2017年 Mar 28日 05:53 
Offline
User avatar

Joined: 2012年 Dec 5日 17:52
Posts: 4526
I don't know the answer but have you tried to use 'WeekEndDays' or a similar word with the same script..?

_________________
Image
...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: 2017年 Mar 28日 06:07 
Offline
User avatar

Joined: 2016年 Jul 24日 03:19
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: 2017年 Mar 28日 07:20 
Offline
User avatar

Joined: 2012年 Dec 5日 17:52
Posts: 4526
I see.. I will take a look and reply if I found the right form :)

_________________
Image
...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: 2017年 Mar 28日 07:38 
Offline
User avatar

Joined: 2016年 Jul 24日 03:19
Posts: 9
thanks jim, i'll be waiting . . . :D

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


Top
 Profile  
 
 Post subject: Re: Calendar font color
PostPosted: 2017年 Mar 28日 08:16 
Offline
User avatar

Joined: 2012年 Dec 5日 17:52
Posts: 4526
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

_________________
Image
...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: 2017年 Mar 28日 18:23 
Offline
User avatar

Joined: 2016年 Jul 24日 03:19
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: 2017年 Mar 28日 22:58 
Offline
User avatar

Joined: 2012年 Dec 5日 17:52
Posts: 4526
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. ;)

_________________
Image
...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 1 guest


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