XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently 2017年 Oct 17日 21:26

All times are UTC - 8 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Widget Size
PostPosted: 2014年 Mar 24日 14:53 
Offline

Joined: 2014年 Mar 24日 13:49
Posts: 3
Is there a way to change a widgets height and width from a function within the widget?

What I'm asking is can I do something like Widget.Width = 578; from within a function and have the widgets width change to that?


Top
 Profile  
 
 Post subject: Re: Widget Size
PostPosted: 2014年 Mar 24日 18:07 
Offline

Joined: 2014年 Mar 24日 13:49
Posts: 3
Or is there a way to scale animated gif's?


Top
 Profile  
 
 Post subject: Re: Widget Size
PostPosted: 2014年 Mar 25日 03:19 
Offline
User avatar

Joined: 2012年 Dec 5日 17:52
Posts: 4548
Topic moved in "Help: XWidget Application" section. Please select the right section.

Now about your question, you can use: (right click on the widget)
1) Window -> Zoom
2) Configure -> Position & Size.

I suggest you to use the first option though to not alterate the real dimensions of the widget.

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


Top
 Profile  
 
 Post subject: Re: Widget Size
PostPosted: 2014年 Mar 26日 17:02 
Offline

Joined: 2014年 Mar 24日 13:49
Posts: 3
What I'd like to do is change the size of the widget during runtime based on the size of a animated gif, or scale a loaded gif to match the size of the wdget.


Top
 Profile  
 
 Post subject: Re: Widget Size
PostPosted: 2014年 Mar 26日 17:09 
Offline
User avatar

Joined: 2012年 Dec 5日 17:52
Posts: 4548
Sorry but you mean to change the size of the widget when runs on the desktop, or using the designer, so you ask help for the Designer process..

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


Top
 Profile  
 
 Post subject: Re: Widget Size
PostPosted: 2014年 Mar 27日 14:46 
Offline

Joined: 2013年 Oct 26日 08:17
Posts: 362
Chronigan wrote:
Is there a way to change a widgets height and width from a function within the widget?

What I'm asking is can I do something like Widget.Width = 578; from within a function and have the widgets width change to that?

yes, it can be done exactly same way as you said,
in the script editor, just place the lines of code in a function and call the function in some way:
- you can call the function by clicking on a button (button1OnClick);
- you can call the function on widget start (widgetOnLoad);
- you can call the function from another function;
- and .....

example:
//don't forget to add function name [button1OnClick] in the [OnClick] of [Button1] Object in the function tab of Designer (to call button1OnClick function when button1 Clicked)
Code:
function button1OnClick()
{
  widget.Width = 578;
  widget.Height = 480;
}


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

All times are UTC - 8 hours


Who is online

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