XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently 2017年 Nov 23日 03:06

All times are UTC - 8 hours




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: 2014年 Oct 14日 02:45 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 572
I have a menu option that when selected should display a layer complete with images and controls.
When that occurs I would like the widget Position = Bottom to become Position = topmost.

I have used the following functions that seem to be applicable:
widget.forceToFround();
widget.bringToFront();

The forceToFround (sic) is an interesting mis-spelling but regardless neither seem to function. The widget stays firmly in the background. Does anyone have any other method of successfully pulling the widget to the topmost position in code?


Last edited by yereverluvinuncleber on 2014年 Oct 18日 06:01, edited 1 time in total.

Top
 Profile  
 
PostPosted: 2014年 Oct 14日 02:52 
Offline
User avatar

Joined: 2012年 Dec 5日 17:52
Posts: 4555
But why should do this though code..??? In the design, just move this layer on top and add a second "press on to close" component on this layer to close it again..
The designing with XW is much more easy and less complicated than Rainmeter. Many times, the complicated things need only a simple thought! :)

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


Top
 Profile  
 
PostPosted: 2014年 Oct 14日 03:46 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 572
I'm not sure my explanation made it clear. The widget is layered, position = bottom.

When I run select the menu option I want the whole widget to be position = topmost, not the layer. I'd be happy to just place the layer on top but I realise the engine won't do that. It is the whole widget I want to bring forward.

The reason for doing it in code is because the function exists and the IDE prompts you providing the facility. If it exists within the IDE/engine then it ought to work. If it works then it simply fulfils the function required. That's all I need. In this case the IDE will not help.

PS. I have no knowledge of rainmeter.


Top
 Profile  
 
PostPosted: 2014年 Oct 14日 04:49 
Offline
User avatar

Joined: 2012年 Dec 5日 17:52
Posts: 4555
XWidget, as you know, HAS the default right click option for all the widgets to select their position. Personally I don't think is very functional have a widget on topmost position, that means have it on top of any window/screen. I don't know for the others but I never use it..

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


Top
 Profile  
 
PostPosted: 2014年 Oct 14日 05:12 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 572
It is occasionally useful to bring a widget forward and if it had been possible to do so in code then I would have used it. I don't really care if the widget's position is 'topmost' or 'normal' as long as I can bring it forward.

If it doesn't work (and I don't think it does) then I won't be able to use it.

If you and anyone else can try those two :

widget.forceToFround();
widget.bringToFront();

and see if they can make them work then please do - and then please report back. If they don't work, when the documentation properly gets going we can mark these as non-operational.


Top
 Profile  
 
PostPosted: 2014年 Oct 17日 17:44 
Offline

Joined: 2013年 Oct 26日 08:17
Posts: 362
i have never used above commands before,
so don't know if they work

i have always used [.WindowZPosition] for this,
but you should know that it will set the config of widget for WindowZPosition (Bottom,Normal,TopMost,KeepTopMost)

Code:
widget.WindowZPosition=-1 //Bottom
widget.WindowZPosition=0 //Normal
widget.WindowZPosition=1 //TopMost
widget.WindowZPosition=2 //KeepTopMost


Note:
you can see the change of ini in the bottom of Debug (Log) window


Top
 Profile  
 
PostPosted: 2014年 Oct 17日 21:16 
Offline

Joined: 2012年 Jun 18日 00:07
Posts: 269
Same as hamid, I also use windowZPosition to control window positions of alerts, message, input boxes and a docked menu bar.

windowZPosition = 0;
alert("Add location is not empty");
windowZPosition = 2;

windowZPosition = 0;
eval(CoreToEdit).cmd(null, "!ShowSetting" );
windowZPosition = 2;


Top
 Profile  
 
PostPosted: 2014年 Oct 17日 22:31 
Offline

Joined: 2013年 Oct 26日 08:17
Posts: 362
i have also tested those 2 commands right now:
i have found this:
Code:
widget.bringToFront() 
//will bring the widget to the front of other widgets (not the programs)

Code:
widget.ForceToFround() 
//will bring the widget to the front of other programs and widgets, also it will set focus to that widget (so you will lose focus from other programs)



AutoComplete is telling something like this,
but about its type, AutoComplete is wrong:
ForceToFround is not of type boolean (true/false), it's a function


Top
 Profile  
 
PostPosted: 2014年 Oct 18日 03:33 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 572
Very useful - thanks will experiment now.


Top
 Profile  
 
PostPosted: 2014年 Oct 18日 06:03 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 572
My experimentation is complete. Thank you for the solutions.

widget.WindowZPosition=-1 //Bottom
widget.WindowZPosition=0 //Normal
widget.WindowZPosition=1 //TopMost
widget.WindowZPosition=2 //KeepTopMost

- is the way to change the zorder of an Xwidget in relation tot he other widgets and it does the job perfectly for me. Changed this post to CLOSED.


Top
 Profile  
 
PostPosted: 2017年 Aug 15日 04:51 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 572
Can this snippet of information make its way into the documentation PLEASE.


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

All times are UTC - 8 hours


Who is online

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