[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/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 - Help using checkbuttons

XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently April 27th, 2024, 9:32 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Help using checkbuttons
PostPosted: October 22nd, 2018, 7:45 am 
Offline

Joined: October 22nd, 2018, 7:37 am
Posts: 5
Hi. I'd like to have some check boxes in my custom widget which is going to be a Christmas shopping tracker. I'd like a checkbox for specifications such as 'bought', 'wrapped' etc. The problem is whenever the widget reloads the check boxes don't remember their last state. Is there some code I can use to get the check boxes to remember their last state, i.e checked or unchecked so that they all don't reset on reload?

Thank you.


Top
 Profile  
 
PostPosted: October 22nd, 2018, 9:40 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
Hello. Could you please attach here a screenshot or better the .xwp to check from the inside what do you mean?

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


Top
 Profile  
 
PostPosted: October 22nd, 2018, 3:10 pm 
Offline

Joined: October 22nd, 2018, 7:37 am
Posts: 5
Hi. I've attached a screenshot. Basically what i've created is a glorified checklist that doesn't function correctly. When the checkboxes are clicked on they show the ticked/unticked variation fine but when the widget is closed and reloaded the boxes don't have any memory. For instances how memos autosave whenever you write on them, that text is still there when it's reloaded. I'm wondering if there's a way to make the checkboxes autosave.


Attachments:
Untitled.png
Untitled.png [ 274.19 KiB | Viewed 5112 times ]
Top
 Profile  
 
PostPosted: October 22nd, 2018, 11:36 pm 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
Hmm.. I see.
I will check the checkbox function.
Meanwhile I'm thinking another way. You can use two images for each box and use the show/hide function with each clickon. Let me do some tests and I will reply to you attaching a demo widgets.

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


Top
 Profile  
 
PostPosted: October 23rd, 2018, 7:45 am 
Offline

Joined: October 22nd, 2018, 7:37 am
Posts: 5
Thank you. I think I have tried that approach come to think of it. The show/hide doesn't save when reloaded though.


Top
 Profile  
 
PostPosted: October 24th, 2018, 2:43 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
You need to use a script to save certain configurations of a widget sparrow 91.
Some advanced functions require java script. Depends on the design.
I will reply asap..

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


Top
 Profile  
 
PostPosted: October 24th, 2018, 10:14 am 
Offline

Joined: October 22nd, 2018, 7:37 am
Posts: 5
Thanks


Top
 Profile  
 
PostPosted: October 24th, 2018, 10:47 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
Ok. I created a demo widget with a trick, using 2 images/ 1 button with my way/script and works fine. :)
One little thing is that for the "button1" I used the background->solidcolor->transparency 1 to make the button clickable because my images are transparent.
Using a background image as you did behind the checked/unchecked images, normally you don't have to do this extra trick.

To reload widgets you can directly press F5 on the widget.


Attachments:
Demo_Check_Uncheck.xwp [28.54 KiB]
Downloaded 363 times

_________________
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/
Top
 Profile  
 
PostPosted: October 25th, 2018, 7:51 am 
Offline

Joined: October 22nd, 2018, 7:37 am
Posts: 5
Perfect, thank you.


Top
 Profile  
 
PostPosted: October 25th, 2018, 10:16 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
You're welcome :)

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


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

All times are UTC - 8 hours


Who is online

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