making checkboxes and radio buttons bigger

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
benghere
Posts: 14
Joined: Wed Jan 15, 2014 12:33 am

making checkboxes and radio buttons bigger

Post by benghere » Wed Jul 23, 2014 3:26 pm

Is there any way to make the native checkbox and radio buttons bigger ? When they get onto a phone screen they are really tiny and I need them bigger for people with disabilities.
Thanks
Ben

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: making checkboxes and radio buttons bigger

Post by jmburnod » Wed Jul 23, 2014 4:05 pm

Hi Ben,
Is there any way to make the native checkbox and radio buttons bigger ?
Yes, You can have a checkbox or radiobutton with the dimension as you want.

I do that like this:
1. Build an group as icon
2. Import snapshot of this group for the icon image
3.Change the look of group for hiliteicon
4.Import snapshot this group for the hiliteicon
5. Create a new button type checkbox or radiobutton
6.Define the icon and hiliteicon of the new btn

Best regards
Jean-Marc
https://alternatic.ch

benghere
Posts: 14
Joined: Wed Jan 15, 2014 12:33 am

Re: making checkboxes and radio buttons bigger

Post by benghere » Wed Jul 23, 2014 8:02 pm

Thank you Jea-Marc. I am not sure how to create a new button type but I will try to search and let you know.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10309
Joined: Wed May 06, 2009 2:28 pm

Re: making checkboxes and radio buttons bigger

Post by dunbarx » Wed Jul 23, 2014 8:55 pm

Hi.

Jean-Marc did not mean to create a new button class, merely to create a new radio or checkbox button. All the other gadgetry he mentioned will fill that new button, resized as you need.

The reason for all this is that the these two buttons styles can be larger, in other words, their rect can be larger, but the "working" part stays the same size. You have to assemble a composite group of controls to do what you ask.

Craig Newman

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: making checkboxes and radio buttons bigger

Post by Simon » Thu Jul 24, 2014 2:02 am

Here you go:
checkbox.png
checkbox.png (927 Bytes) Viewed 10287 times
checkbox_empty.png
checkbox_empty.png (1.01 KiB) Viewed 10287 times
Just take your radio or checkbox buttons and set their icons to those 2 images.
empty to icon
checkbox to highlite
resize the button to fit :)

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

benghere
Posts: 14
Joined: Wed Jan 15, 2014 12:33 am

Re: making checkboxes and radio buttons bigger

Post by benghere » Sat Jul 26, 2014 5:33 am

Thank you. Appreciate the answers.

DavJans
Posts: 275
Joined: Thu Dec 12, 2013 4:21 pm

Re: making checkboxes and radio buttons bigger

Post by DavJans » Thu Jul 21, 2016 9:26 pm

This is great, but I ran into a snag while trying to use this.

if the check box is disabled (locked so that it cant be changed) It only shows "Icon" weather it is hilited or not.

Is there a way to get around this?
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: making checkboxes and radio buttons bigger

Post by jmburnod » Fri Jul 22, 2016 10:47 am

Hi Devjans,
You can use something like that:

Code: Select all

--•• ena/dis control
on enaControl pControlID --,pHilite
   enable control id pControlID
   set the blendlevel of control id pControlID to 0
   -- set hilite to customprop uMyHilite
   set the hilite of control id pControlID to (the uMyHilite of control id pControlID)
end enaControl

on disControl pControlID --,pHilite
   disable control id pControlID
   set the blendlevel of control id pControlID to 50
   -- store hilite of btn into customprop
   set the uMyHilite of control id pControlID to (the hilite of control id pControlID)
   set the hilite of control id pControlID to false
end disControl
Best regards
Jean-Marc
https://alternatic.ch

residuegoring424
Posts: 1
Joined: Thu Oct 06, 2016 9:26 am

Re: making checkboxes and radio buttons bigger

Post by residuegoring424 » Sat Oct 08, 2016 11:07 am

jmburnod wrote:Hi Ben,
Is there any way to make the native checkbox and radio buttons bigger ?
Yes, You can have a checkbox or radiobutton with the dimension as you want.

I do that like this:
1. Build an group as icons
2. Import snapshot of this group for the icon image
3.Change the look of group for hiliteicon
4.Import snapshot this group for the hiliteicon
5. Create a new button type checkbox or radiobutton
6.Define the icon and hiliteicon of the new btn

Best regards
Jean-Marc
Thanks, fixed my issue.
Last edited by residuegoring424 on Sun Oct 16, 2016 9:13 am, edited 1 time in total.

zaxos
Posts: 222
Joined: Thu May 23, 2013 11:15 pm

Re: making checkboxes and radio buttons bigger

Post by zaxos » Sat Oct 08, 2016 12:00 pm

Just in case you want to use custom made checkboxes.
Attachments
controls.zip
(3.26 KiB) Downloaded 287 times
Knowledge is meant to be shared.

jad albert
Posts: 3
Joined: Mon Oct 10, 2016 9:46 am

Re: making checkboxes and radio buttons bigger

Post by jad albert » Mon Oct 10, 2016 9:55 am

jmburnod wrote:Hi Ben,
Is there any way to make the native checkbox and radio buttons bigger ?
Yes, You can have a checkbox or radiobutton with the dimension as you want.

I do that like this:
1. Build an group as icon
2. Import snapshot of this group for the icon image
3.Change the look of group for hiliteicon
4.Import snapshot this group for the hiliteicon
5. Create a new button type checkbox or radiobutton
6.Define the icon and hiliteicon of the new btn

Best regards
Jean-Marc
I have followed you instructions but i am unable to get it done. Would you please share some alternate way that is easy to do.

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: making checkboxes and radio buttons bigger

Post by jmburnod » Mon Oct 10, 2016 10:33 am

Hi Jad Albert

To cook a btn with hilite you need two images
One for icon and one for hiliteicon.
You can create an image using "import snapshot" from a control
I use group because you can drawing an image with controls (fields, images, grcs).

Please try this (pseudo code)
Create a grc oval "MyGrc01" opaque 48X48, white
Create a grc oval "MyGrc02" opaque 24X24, blue
set the loc of grc "MyGrc02" to the loc of grc "MyGrc01"
select grc "MyGrc01" and grc "MyGrc02"
group (object menu or toolbar)
rename this group to "grMygroup"
set the opaque of group "grMygroup" to false
import snapshot from group "grMygroup"

You created the image which you can use like icon for your btn

set the icon of btn bMyButton to the short id of last image

Same way for the hiliteicon

Best regards
Jean-Marc
https://alternatic.ch

jad albert
Posts: 3
Joined: Mon Oct 10, 2016 9:46 am

Re: making checkboxes and radio buttons bigger

Post by jad albert » Fri Oct 14, 2016 10:34 pm

jmburnod wrote:Hi Jad Albert

To cook a btn with hilite you need two images
One for icon and one for hiliteicon.
You can create an image using "import snapshot" from a control
I use group because you can drawing an image with controls (fields, images, grcs).

Please try this (pseudo code)
Create a grc oval "MyGrc01" opaque 48X48, white
Create a grc oval "MyGrc02" opaque 24X24, blue
set the loc of grc "MyGrc02" to the loc of grc "MyGrc01"
select grc "MyGrc01" and grc "MyGrc02"
group (object menu or toolbar)
rename this group to "grMygroup"
set the opaque of group "grMygroup" to false
import snapshot from group "grMygroup"

You created the image which you can use like icon for your btn

set the icon of btn bMyButton to the short id of last image

Same way for the hiliteicon

Best regards
Jean-Marc
Thank you so much!

Post Reply