Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Changing font size in digital clock gadget

25 Oct 2012   #1
ajburr

Windows 7 64-bit
 
 
Changing font size in digital clock gadget

I don't know if anyone here can help me with this, but I found an example of how to make your own digital clock gadget in Windows 7. I liked the fact that it could be customized to any font on my computer, however, I've been trying to edit the code to increase the font size but nothing I do has an effect, including changing "font-size: 10pt;" to anything else.

Here's the html file code:

Quote:
<html>
<head>
<title>Digital Clock</title>
<style>
body
{
margin: 0;
width: 600px;
height: 200px;
}
#gadgetContent
{
width: 500px;
top: 150px;
text-align: center;
font-family: verdana;
font-size: 10pt;
}
</style>
<script language="javascript">
function showtime()
{
var now=new Date();
var h=now.getHours();
var m=now.getMinutes();
var s=now.getSeconds();
h=(h<10)?"0"+h:h;
m=(m<10)?"0"+m:m;
s=(s<10)?"0"+s:s;
gadgetContent.innerHTML="<h2><font color='orange'>"+h+":</font><font color='cyan'>"+m+":</font><font color='white'>"+s+"</font></h2>";
setTimeout("showtime()",1000);
}
</script>
</head>
<body onLoad="showtime()" bgcolor="black">
<span id="gadgetContent"></span>
</body>
</html>
And here's the XML file code:

Quote:
<?xml version="1.0" encoding="utf-8" ?>
<gadget>
<name>DigitalClock</name>
<namespace>Example.Azim</namespace>
<version>1.0.0.0</version>
<author name="Azim">
<info url="www.example.com" />
</author>
<copyright>Azim</copyright>
<description>Digital Clock</description>
<hosts>
<host name="sidebar">
<base type="HTML" apiVersion="1.0.0" src="DigitalClock.html" />
<platform minPlatformVersion="1.0" />
<permissions>Full</permissions>
</host>
</hosts>
</gadget>
If you happen to see an error in the code that's preventing me from changing the font size, please let me know.


My System SpecsSystem Spec
.

25 Oct 2012   #2
Bongo

Microsoft Community Contributor Award Recipient

Win 7 Pro x64 / Win 8.1 Pro
 
 

Post a link to the gadget or zip up the gadget folder and post it here and I will look at it.

Jerry
My System SpecsSystem Spec
25 Oct 2012   #3
ajburr

Windows 7 64-bit
 
 

Attached!


Attached Files
File Type: zip clock.zip (945 Bytes, 30 views)
My System SpecsSystem Spec
.


25 Oct 2012   #4
Bongo

Microsoft Community Contributor Award Recipient

Win 7 Pro x64 / Win 8.1 Pro
 
 

I need the whole folder so I can install the gadget and look at all the files so I can test.

Jerry
My System SpecsSystem Spec
25 Oct 2012   #5
ajburr

Windows 7 64-bit
 
 

Well, here's the folder. But there isn't anything else in there that I know of:


Attached Files
File Type: rar DigitalClock.gadget.rar (968 Bytes, 19 views)
My System SpecsSystem Spec
25 Oct 2012   #6
Bongo

Microsoft Community Contributor Award Recipient

Win 7 Pro x64 / Win 8.1 Pro
 
 

It only had the 2 files.

Do you have the clock working?

Jerry
My System SpecsSystem Spec
25 Oct 2012   #7
ajburr

Windows 7 64-bit
 
 

Yep, it works just fine. It uses military time, but I don't mind that so much. Any ideas on how to modify the font size?

By the way, here's the link where I got the files and instructions: http://www.c-sharpcorner.com/UploadF...indows-gadget/

I chose this because it seemed simple and I could choose whatever font I wanted. Obviously it's not quite as simple as I thought.
My System SpecsSystem Spec
26 Oct 2012   #8
Bongo

Microsoft Community Contributor Award Recipient

Win 7 Pro x64 / Win 8.1 Pro
 
 

Wow I have never seen such a simple gadget with only two files, but for the life of me I cannot find a way to change the text size. I'm sure if you did a little more looking around you can find a digital clock gadget that would allow all a little bit more customizing.

Jerry
My System SpecsSystem Spec
26 Oct 2012   #9
ajburr

Windows 7 64-bit
 
 

Quote:
I'm sure if you did a little more looking around you can find a digital clock gadget that would allow all a little bit more customizing.
LOL You would think so, wouldn't you? I've searched high and low, and this is the only one I could find that would allow me to choose my font.


EDIT: There is another clock gadget I tried, but I dismissed it because there seems to be a space constraint when I used certain fonts. The numbers and letters end up over-lapping. Maybe that gadget would be the way to go, but could you look to see how I could make it bigger (not the font, but the clock dimensions themselves).


Attached Files
File Type: rar HUD-Time.gadget.rar (24.5 KB, 11 views)
My System SpecsSystem Spec
26 Oct 2012   #10
Bongo

Microsoft Community Contributor Award Recipient

Win 7 Pro x64 / Win 8.1 Pro
 
 

Here is one that will let you to change the font and the color and the size of the font.

Digital - clocket6 by ~clockets on deviantART

Jerry
My System SpecsSystem Spec
Reply

 Changing font size in digital clock gadget




Thread Tools





Similar help and support threads
Thread Forum
Changing font size... not the icon
This was excellent with the RC version of win 7, I mean, it installed it all on its own, it was like it read my mind and knew that I was getting old and I was going to be happy with the font size. Well, it all changed with the RYN version, I manually had to use the 125% dpi option, which worked...
General Discussion
Change Windows Clock's font size
Hey guys, I was wondering how you can change the font size of the windows clock (lower right, on the task bar). I have it two rows high, and I would like it to say the name of the day as well, instead of just the Time and numeric date without making it larger vertically. I think that making the...
Customization
Change font size without changing anything else
In WinXP, there was an option in the display settings where I could increase the font DPI. This ONLY increased the windows program fonts and affected little else. So the text under the icons was small, as was the text in various dialog boxes. However, it would have NO effect whatsoever on web...
General Discussion
Font size changing whenever changing settings in personalization.
Hello sevenforums! I have a problem with my computer i recently purchased. Here is my story. This all started whenever I wanted to change my text size different by changing my DPI settings. What I did was right click, go to screen resolution, and clicked on "Make text and other items larger or...
General Discussion
Changing font size, how?
How to change with W7 the font size on dialog buttons, menues, for folders, etc? I cant find even the place to do it. On vista it was where themes were listed, under theme selection was drop down menu where could select font size. Where it is on Windows 7? :shock: I don't mean DPI, I only want to...
General Discussion
digital clock gadget
does anyone know a digital clock gadget with calender+alarm, i recently had one but i don't remember where i downloaded it from?
Gadgets

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 08:24.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App