Recent Widgets


Register for DashboardWidgets

Recent Forums Posts

Partners


iCompositions

MacDesktops.net

RSS Showcase
RSS Comments
RSS Forums

This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. Posted in: Widget Design

Custom checkboxes?

Author Message
galacticaa



Joined: 04 Jul 2005
Posts: 3

Posted: Sat Aug 06, 2005 - 10:29 pm    Post subject: Custom checkboxes? Reply with quote

I need a custom checkbox to match the transparent 'Done' button seen on many widgets.

These buttons are non-Aqua GUI elements, as recommended by Apple's guidelines for creating widgets.

Has anyone made one of these? Or maybe seen such a checkbox in another widget?
View user's profile Send private message Send e-mail Visit poster's website Widgets
purvisa



Joined: 21 Jul 2005
Posts: 182
Location: Kirkland, WA

Posted: Sun Aug 07, 2005 - 1:38 am    Post subject: Reply with quote

I am looking into doing something similar, but I was going to make an end run on the problem. You can do an onClick image swap with your custom look. By using the same name attribute, you should still be able to group the images into a single array to cycle through them as if they were checkboxes.

That said, I have yet to test that, but there is no reason it should not work, especially if you want complete control.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger Widgets
Ludge



Joined: 09 May 2005
Posts: 98
Location: UK

Posted: Sun Aug 07, 2005 - 1:39 am    Post subject: Reply with quote

You can see examples in the Apple-made Widget Manager widget in 10.4.2.

There is a tutorial on how to make custom drop-down menus in the Apple Dashboard programming guide. This can be adapted to work with checkboxes.

Link to tutorial.
_________________
BatteryInfo widget
AdiumList widget.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Widgets
gurth



Joined: 21 Jul 2005
Posts: 47
Location: Netherlands

Posted: Sun Aug 07, 2005 - 5:03 am    Post subject: Re: Custom checkboxes? Reply with quote

galacticaa wrote:
I need a custom checkbox to match the transparent 'Done' button seen on many widgets.

This shouldn't be too hard to do, I think. If you take the left and right sides of the button that Apple provides (/System/Library/WidgetResources/button/) and put them together in your favorite graphics program, you'll have a square button that you can reduce in size to the dimensions you need. Either do this with both the light and the dark versions, or make another "checked" version yourself (for example by drawing a check mark into the empty button you just created).

Now all you need to do is write a little function to switch the image back and forth between checked and unchecked, and call it using the checkbox's "onclick" attribute.
View user's profile Send private message Send e-mail Widgets
galacticaa



Joined: 04 Jul 2005
Posts: 3

Posted: Sun Aug 07, 2005 - 4:13 pm    Post subject: Reply with quote

Thanks for the responses, guys.

My current choice is to make my own checkbox widget. I've already made a custom pulldown menu, so I'm pretty familiar with the custom element process. Was just hoping someone had already made a checkbox graphic.

I'm looking around for the checkbox seen in the Widget Manager, but I can't find where that widget is stored... any ideas?
View user's profile Send private message Send e-mail Visit poster's website Widgets
daylate



Joined: 19 Jun 2005
Posts: 18

Posted: Thu Sep 01, 2005 - 4:25 pm    Post subject: Reply with quote

Hello ...

I created a transparent checkbox from the pieces of Apple's "Done" button. The graphics (with black and white "x" choices, and darkened "pressed" states*) are in the "dldscontrols" folder of the latest versions of my Tile Game mini and/or Peg Game mini widgets. You are free to use those elements if you like. (A commented credit in the HTML or someplace would be nice, and/or keep the images in a "dldscontrols" folder in your own widget.)

What *I* need is a matching set of radio button images. I can't quite get the highlighting right when I try to create them from scratch, and rounding the corners of the checkbox doesn't look good, either.

Suggestions?

--DayLate


*Truth be told, I haven't coded the pressing behavior properly (I just trigger the selection on mousedown), but at least I have the graphics ready!
View user's profile Send private message Visit poster's website Widgets
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

 
Powered by phpBB © 2001, 2002 phpBB Group