[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4668: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4670: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4671: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4672: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
XWidgetSoft Forum • View topic - Hiding and closing all widgets from within a widget

XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently April 19th, 2024, 6:49 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 14 posts ] 
Author Message
PostPosted: March 4th, 2014, 8:28 am 
Offline

Joined: March 4th, 2014, 8:23 am
Posts: 11
I am new to xwidgets and I first have to say that it is one of the best I have found.
I found that one can hide and show all the widgets with a shortcut key and also from several menus.
What I would like to do is create a widget that will allow the user to click on a button and hide all of the
widgets except this one widget. I would also like to have this widget close all widgets including itself with
another button. Is there are way to do this? Any help would be appreacited. Nicholas :?:


Top
 Profile  
 
PostPosted: March 4th, 2014, 9:02 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
There is already an option/button to hide widgets.
To configurate rigth click on the XWidget's icon tray and select "options"
I think that the default key is th F12.
Also there is the default right click option for this for each widget on the desktop. Selecting "hide", the widget will be hidden until you press F12 (or any other key assigned by you)
I dont know if you mean these functions..

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


Top
 Profile  
 
PostPosted: March 4th, 2014, 9:26 am 
Offline

Joined: March 4th, 2014, 8:23 am
Posts: 11
Thanks jimking. I know about these options.

I would like to do it from a button in a widget, rather that have to use a hot key or right click from the menu.
I want to do it with a single click on a button on the desktop from within a widget.

Any way to do that?

Thanks,

Nicholas


Top
 Profile  
 
PostPosted: March 4th, 2014, 10:31 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
Really I don't know IF this is possible though a script.. This an option of the program itself, that surely works in a whole different way and programming than a simple widget. Personally I don't think that is possible to have it though a widget..

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


Top
 Profile  
 
PostPosted: March 4th, 2014, 10:55 am 
Offline

Joined: March 4th, 2014, 8:23 am
Posts: 11
Thanks for your reply.

I figured that it was not possible....but thought I would ask.

Regards,

Nicholas


Top
 Profile  
 
PostPosted: March 4th, 2014, 1:47 pm 
Offline

Joined: June 18th, 2012, 12:07 am
Posts: 268
Possible with messages, is this suitable :?:

// In the sender widget use this code from the button click to close all widgets
function button1OnClick(Sender)
{
msg("close","receiver");
// add extra lines replacing "receiver" with the name of the widgets you wish to close
}

// In the widget you wish to close add this code
function widgetOnMsg(MsgString)
{
if(MsgString=="close")
widget.close
}

Dont forget in the widget you wish to close to set the function
OnMsg = widgetOnMsg
so the code runs when a message is received


Top
 Profile  
 
PostPosted: March 4th, 2014, 2:19 pm 
Offline

Joined: March 4th, 2014, 8:23 am
Posts: 11
This is exactly the kind of thing I was looking for.. but I cannot seem to get it to work.

First the msg() function is shown different that in your example as follows in the popup message help in designer:

Msg("msg:string"):string // note there was no colon : in the example.

Where are you had the syntax as:

msg("close","receiver");

So I am not sure that the syntax is correct.

I am also am not sure that know the actual name of the widget; but I think I am referring to the display name,
but that might not ne the name of the running process...

still trying to make it work.

Any additional help or suggestions appreciated.


Top
 Profile  
 
PostPosted: March 4th, 2014, 3:45 pm 
Offline

Joined: June 18th, 2012, 12:07 am
Posts: 268


Top
 Profile  
 
PostPosted: March 4th, 2014, 3:52 pm 
Offline

Joined: March 4th, 2014, 8:23 am
Posts: 11
Thanks for you help.

Please do post a sample of sender receiver.
I am still struggling to get it to work.

Tried everything I know.

I even found another post that explained how to do this; but it told what to do and not how.
So I still do not know the syntax of how to make it work.

Thanks,


Top
 Profile  
 
PostPosted: March 4th, 2014, 4:29 pm 
Offline

Joined: June 18th, 2012, 12:07 am
Posts: 268
Samples attached
Run them both, not debug, msg does not work in debug.
With both running clink sender and receiver should close.


Attachments:
receiver_sample.xwp [5.4 KiB]
Downloaded 227 times
sender_sample.xwp [5.4 KiB]
Downloaded 214 times
Top
 Profile  
 
PostPosted: March 4th, 2014, 4:57 pm 
Offline

Joined: March 4th, 2014, 8:23 am
Posts: 11
Thank you it works. Really appreciate it.


Top
 Profile  
 
PostPosted: March 4th, 2014, 4:59 pm 
Offline

Joined: March 4th, 2014, 8:23 am
Posts: 11
Ok I see how it works.. but these are packages.. I cannot see the code so I can desing my own widgets.
Can you also post the xwl files? Please.


Top
 Profile  
 
PostPosted: March 4th, 2014, 8:37 pm 
Offline

Joined: June 18th, 2012, 12:07 am
Posts: 268
Once you open the package they are installed, when the widgets are running, right click on them and select edit, they will open in designer, you have and can see everything.


Top
 Profile  
 
PostPosted: March 5th, 2014, 7:08 am 
Offline

Joined: March 4th, 2014, 8:23 am
Posts: 11
Thanks. I see now that after the package is run that the script and other files are created in a folder.
Works great. My problem was because I was not using the onMsg for the widget to start the widgetonmsg function.
Once I fixed that it worked like a charm. I can hide and show and close.

Thank you again.


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

All times are UTC - 8 hours


Who is online

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