XWidgetSoft Forum

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

All times are UTC - 8 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: August 19th, 2012, 8:24 am 
Offline
User avatar

Joined: August 18th, 2012, 4:08 pm
Posts: 101
Location: Oradea, Bihor, Romania
Hi! I'm making a new widget, and I added to the right-click menu two buttons: Reflection Off and Reflection On. The buttons should Enable and Disable the Reflection of the main docking box, but only the Reflection Off works. Here is the code:

Code:
function ReflectionOnClick(Sender)
{
  if(Background.Effect.Reflection.Enabled = true)
  {
    Background.Effect.Reflection.Enabled = false;
    widget.Height = 605;
  }
}

function ReflectionOnOnClick(Sender)
{
  if(Background.Effect.Reflection.Enabled = false)
  {
    Background.Effect.Reflection.Enabled = true;
    widget.Height = 675;
  }
}


Thanks for the help!

Best regards,
Nutu'

_________________
" Homosexuality exists in 450 species. Homophobia is found in only one. Which seems unnatural now?
Image


Top
 Profile  
 
PostPosted: September 6th, 2012, 5:36 am 
Offline
User avatar

Joined: June 10th, 2012, 5:57 am
Posts: 313
Hi , Nutu , your code has one problem
if you want to judge , you need to use "==" , but not "="

the same effect using only one right-click menu button:
Code:
function menuitem1OnClick(Sender)
{
  Background.Effect.Reflection.Enabled = !Background.Effect.Reflection.Enabled;
  widget.height= 1280 - widget.height // 605+675=1280
}


Top
 Profile  
 
PostPosted: September 9th, 2012, 4:58 pm 
Offline
User avatar

Joined: August 18th, 2012, 4:08 pm
Posts: 101
Location: Oradea, Bihor, Romania
Thanks a lot. It works now :D

_________________
" Homosexuality exists in 450 species. Homophobia is found in only one. Which seems unnatural now?
Image


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 57 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