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 Central

Making a normal scrollbar work

Author Message
skyhawkrider



Joined: 06 Jul 2005
Posts: 20
Location: Boulder, CO

Posted: Sat Jul 16, 2005 - 9:17 pm    Post subject: Making a normal scrollbar work Reply with quote

I need to know how to get scrollbars working in Dashboard. I don't need to have it custom (I'll work on that part later), but I just need to get it to work. Could someone help me with this?

Thanks.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Widgets
Chris



Joined: 27 Jan 2005
Posts: 344
Location: Durham, UK

Posted: Sun Jul 17, 2005 - 5:48 am    Post subject: Reply with quote

Set the dimensions of the element (likely a <div>) and then use overflow: auto; in your CSS. This will bring up a scrollbar when needed.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Widgets
jonlink



Joined: 27 May 2005
Posts: 172

Posted: Sat Jul 30, 2005 - 4:09 pm    Post subject: Reply with quote

uhmm... does that actually work? i didn't think it would.
View user's profile Send private message Send e-mail Widgets
robotspacer



Joined: 09 Jun 2005
Posts: 21
Location: United States

Posted: Sat Jul 30, 2005 - 8:44 pm    Post subject: Reply with quote

Widgets are rendered just like Safari; it should work fine. Most people don't do it that way because Apple's style guide recommends not using standard aqua controls on the front of widgets.
View user's profile Send private message Send e-mail Visit poster's website Widgets
jonlink



Joined: 27 May 2005
Posts: 172

Posted: Sun Jul 31, 2005 - 3:03 am    Post subject: Reply with quote

well unless i did something wrong it doesn't work. i just did a quick test, nothing complex. i tried it with auto and with scroll. i'm pretty sure it doesn't work. not that it matters really, i don't want to do this, but i was just curious if the answer was correct.
View user's profile Send private message Send e-mail Widgets
robotspacer



Joined: 09 Jun 2005
Posts: 21
Location: United States

Posted: Sun Jul 31, 2005 - 3:21 am    Post subject: Reply with quote

I just tried it; worked fine for me.

Code:
<html>
<body>

<div style="width:100px;height:100px;overflow:auto;">Adipis enis diamcon class dolummy incing egestas scelerisque; consectem modiam dolendit utate. Odionsequip cursus eugiam voloreros nonsequi ilis. Augait ullut dolorer morbi. Dolortis adion tismolortis viverra imperdiet ipiscip sum, nissi modiam nisit olorper tin hendrerit. </div>

</body>
</html>


As mentioned above, you do need to specify dimensions, and of course with auto you won't see scroll bars unless there's enough text. Make sure everything fits in the outer dimensions of the widget as well. The scroll bars don't quite work properly for me—dragging it actually drags the widget—but they do work. You can click the arrows or click a spot in the track.
View user's profile Send private message Send e-mail Visit poster's website Widgets
Ludge



Joined: 09 May 2005
Posts: 98
Location: UK

Posted: Sun Jul 31, 2005 - 3:55 am    Post subject: Reply with quote

Why use auto when

Code:
overflow: scroll;


is much more explicit?
_________________
BatteryInfo widget
AdiumList widget.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Widgets
robotspacer



Joined: 09 Jun 2005
Posts: 21
Location: United States

Posted: Sun Jul 31, 2005 - 4:17 am    Post subject: Reply with quote

Because always having scroll bars in both directions is ugly! Smile
View user's profile Send private message Send e-mail Visit poster's website Widgets
Ludge



Joined: 09 May 2005
Posts: 98
Location: UK

Posted: Sun Jul 31, 2005 - 6:22 am    Post subject: Reply with quote

Oops! Didn't realise it gave horizontal ones too!
_________________
BatteryInfo widget
AdiumList widget.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Widgets
jonlink



Joined: 27 May 2005
Posts: 172

Posted: Sun Jul 31, 2005 - 11:27 am    Post subject: Reply with quote

that;s weird i don't know whaty it didn't work for me-- i'used it a dozen times before on real webpages. i wonder if the drag problem could be fixed with
Code:
-apple-dashboard-region:dashboard-region(control rectangle)


thanks for setting the records straight.
View user's profile Send private message Send e-mail 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