[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
https://bbs.xwidget.com/

Hiding and closing all widgets from within a widget
https://bbs.xwidget.com/viewtopic.php?f=8&t=4211
Page 1 of 1

Author:  nromano63 [ March 4th, 2014, 8:28 am ]
Post subject:  Hiding and closing all widgets from within a widget

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 :?:

Author:  Jimking [ March 4th, 2014, 9:02 am ]
Post subject:  Re: Hiding and closing all widgets from within a widget

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

Author:  nromano63 [ March 4th, 2014, 9:26 am ]
Post subject:  Re: Hiding and closing all widgets from within a widget

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

Author:  Jimking [ March 4th, 2014, 10:31 am ]
Post subject:  Re: Hiding and closing all widgets from within a widget

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

Author:  nromano63 [ March 4th, 2014, 10:55 am ]
Post subject:  Re: Hiding and closing all widgets from within a widget

Thanks for your reply.

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

Regards,

Nicholas

Author:  meme [ March 4th, 2014, 1:47 pm ]
Post subject:  Re: Hiding and closing all widgets from within a widget

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

Author:  nromano63 [ March 4th, 2014, 2:19 pm ]
Post subject:  Re: Hiding and closing all widgets from within a widget

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.

Author:  meme [ March 4th, 2014, 3:45 pm ]
Post subject:  Re: Hiding and closing all widgets from within a widget


Author:  nromano63 [ March 4th, 2014, 3:52 pm ]
Post subject:  Re: Hiding and closing all widgets from within a widget

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,

Author:  meme [ March 4th, 2014, 4:29 pm ]
Post subject:  Re: Hiding and closing all widgets from within a widget

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 228 times
sender_sample.xwp [5.4 KiB]
Downloaded 214 times

Author:  nromano63 [ March 4th, 2014, 4:57 pm ]
Post subject:  Re: Hiding and closing all widgets from within a widget

Thank you it works. Really appreciate it.

Author:  nromano63 [ March 4th, 2014, 4:59 pm ]
Post subject:  Re: Hiding and closing all widgets from within a widget

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.

Author:  meme [ March 4th, 2014, 8:37 pm ]
Post subject:  Re: Hiding and closing all widgets from within a widget

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.

Author:  nromano63 [ March 5th, 2014, 7:08 am ]
Post subject:  Re: Hiding and closing all widgets from within a widget

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.

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/