473,320 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

7-bar display

Hi,

I would like to display digits with a 7-bar display, as in a pocket
calculator.
Any ideas about how to do this?

Francis

Oct 30 '06 #1
11 2379
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
Hi,

I would like to display digits with a 7-bar display, as in a pocket
calculator.
Any ideas about how to do this?
Just find a font like that?

Or you could do it with CSS tricks and some JS (if you needed to update
the display). I would use borders for the actual "bars" since they are
mitred (diagonal edges) just like on a pocket calculator.

Two boxes one on top of the other, with fixed with and height, and quite
thick borders on all sides. Toggle border-color on the borders.

Here's a 2:

<head>
<style type="text/css">
body
{
background-color: white;
}
div
{
width: 200px;
height: 300px;
border: 50px solid black;
}
#top
{
border-left-color: white;
border-bottom-width: 25px;
}
#bottom
{
border-right-color: white;
border-top-width: 25px;
}
</style>
</head>
<body>
<div id="top"></div>
<div id="bottom"></div>
</body>

Maybe making the vertical bars a slightly different colour from the
horizontal ones would look good too.
Oct 30 '06 #2

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
Hi,

I would like to display digits with a 7-bar display, as in a pocket
calculator.
Any ideas about how to do this?

Just find a font like that?

Or you could do it with CSS tricks and some JS (if you needed to update
the display). I would use borders for the actual "bars" since they are
mitred (diagonal edges) just like on a pocket calculator.

Two boxes one on top of the other, with fixed with and height, and quite
thick borders on all sides. Toggle border-color on the borders.

Here's a 2:

<head>
<style type="text/css">
body
{
background-color: white;
}
div
{
width: 200px;
height: 300px;
border: 50px solid black;
}
#top
{
border-left-color: white;
border-bottom-width: 25px;
}
#bottom
{
border-right-color: white;
border-top-width: 25px;
}
</style>
</head>
<body>
<div id="top"></div>
<div id="bottom"></div>
</body>

Maybe making the vertical bars a slightly different colour from the
horizontal ones would look good too.
Thank you for this reply.
I'm afraid the div solution would get complicated, as I want to display
complex numbers such as 123,567.89.
Maybe the font solution would be best. But I see no font for 7-bar
displays in Windows. Is there any way of seamlessly downloading a font
onto the user's PC?

Oct 30 '06 #3
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
>
Ben C wrote:
>On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
Hi,

I would like to display digits with a 7-bar display, as in a pocket
calculator.
Any ideas about how to do this?

Just find a font like that?

Or you could do it with CSS tricks and some JS (if you needed to update
the display). I would use borders for the actual "bars" since they are
mitred (diagonal edges) just like on a pocket calculator.
[snip]
Thank you for this reply.
I'm afraid the div solution would get complicated, as I want to display
complex numbers such as 123,567.89.
Maybe the font solution would be best. But I see no font for 7-bar
displays in Windows. Is there any way of seamlessly downloading a font
onto the user's PC?
I hope not!
Oct 30 '06 #4

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
Hi,

I would like to display digits with a 7-bar display, as in a pocket
calculator.
Any ideas about how to do this?

Just find a font like that?

Or you could do it with CSS tricks and some JS (if you needed to update
the display). I would use borders for the actual "bars" since they are
mitred (diagonal edges) just like on a pocket calculator.
[snip]
Thank you for this reply.
I'm afraid the div solution would get complicated, as I want to display
complex numbers such as 123,567.89.
Maybe the font solution would be best. But I see no font for 7-bar
displays in Windows. Is there any way of seamlessly downloading a font
onto the user's PC?

I hope not!
Why not?

Oct 30 '06 #5
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
>
Ben C wrote:
>On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
>
Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
Hi,

I would like to display digits with a 7-bar display, as in a pocket
calculator.
Any ideas about how to do this?

Just find a font like that?

Or you could do it with CSS tricks and some JS (if you needed to update
the display). I would use borders for the actual "bars" since they are
mitred (diagonal edges) just like on a pocket calculator.
[snip]
Thank you for this reply.
I'm afraid the div solution would get complicated, as I want to display
complex numbers such as 123,567.89.
Maybe the font solution would be best. But I see no font for 7-bar
displays in Windows. Is there any way of seamlessly downloading a font
onto the user's PC?

I hope not!

Why not?
Many users like to have a feeling of control over what resides on their
hard disk. Things getting seamlessly downloaded is at odds with this
requirement.

Even apart from the obvious security problems, it's a practical thing
too. Suppose one day my text editor stops working properly. It is
easier to trace the cause of the problem if I don't have to consider the
possibility that a web site I visited altered my fonts installation.

I just thought of another way you could do your calculator digits. Since
you only need 10 digits plus comma and decimal point, you could just
make 12 images (gif, png etc.) of the digits and arrange those on your
page in the proper sequences.
Oct 30 '06 #6

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
Hi,

I would like to display digits with a 7-bar display, as in a pocket
calculator.
Any ideas about how to do this?

Just find a font like that?

Or you could do it with CSS tricks and some JS (if you needed to update
the display). I would use borders for the actual "bars" since they are
mitred (diagonal edges) just like on a pocket calculator.
[snip]
Thank you for this reply.
I'm afraid the div solution would get complicated, as I want to display
complex numbers such as 123,567.89.
Maybe the font solution would be best. But I see no font for 7-bar
displays in Windows. Is there any way of seamlessly downloading a font
onto the user's PC?

I hope not!
Why not?

Many users like to have a feeling of control over what resides on their
hard disk. Things getting seamlessly downloaded is at odds with this
requirement.

Even apart from the obvious security problems, it's a practical thing
too. Suppose one day my text editor stops working properly. It is
easier to trace the cause of the problem if I don't have to consider the
possibility that a web site I visited altered my fonts installation.

I just thought of another way you could do your calculator digits. Since
you only need 10 digits plus comma and decimal point, you could just
make 12 images (gif, png etc.) of the digits and arrange those on your
page in the proper sequences.
What I meant by seamlessly was that I did not want the user to have to
follow a 9-point procedure involving rebooting, opening the register or
the like. If Imust ask his or her permission, that's no problem for me.

Francis

Oct 30 '06 #7
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
>
Ben C wrote:
>On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
>
Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
Hi,

I would like to display digits with a 7-bar display, as in a pocket
calculator.
Any ideas about how to do this?

Just find a font like that?

Or you could do it with CSS tricks and some JS (if you needed to update
the display). I would use borders for the actual "bars" since they are
mitred (diagonal edges) just like on a pocket calculator.
[snip]
Thank you for this reply.
I'm afraid the div solution would get complicated, as I want to display
complex numbers such as 123,567.89.
Maybe the font solution would be best. But I see no font for 7-bar
displays in Windows. Is there any way of seamlessly downloading a font
onto the user's PC?

I hope not!

Why not?

Many users like to have a feeling of control over what resides on their
hard disk. Things getting seamlessly downloaded is at odds with this
requirement.

Even apart from the obvious security problems, it's a practical thing
too. Suppose one day my text editor stops working properly. It is
easier to trace the cause of the problem if I don't have to consider the
possibility that a web site I visited altered my fonts installation.

I just thought of another way you could do your calculator digits. Since
you only need 10 digits plus comma and decimal point, you could just
make 12 images (gif, png etc.) of the digits and arrange those on your
page in the proper sequences.

What I meant by seamlessly was that I did not want the user to have to
follow a 9-point procedure involving rebooting, opening the register or
the like. If Imust ask his or her permission, that's no problem for me.
Well if you're sure... I don't know the application of your page, but if
it's on the www, I'm not sure how many users will be inclined to install
a special font just to look at it. It's just not what people expect to
have to do.

Also I don't know if it's possible to install a font on Windows without
the 9-point procedure involving rebooting, but I don't know much about
Windows. You may have some luck asking on a Windows NG.
Oct 30 '06 #8

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
Hi,

I would like to display digits with a 7-bar display, as in a pocket
calculator.
Any ideas about how to do this?

Just find a font like that?

Or you could do it with CSS tricks and some JS (if you needed to update
the display). I would use borders for the actual "bars" since they are
mitred (diagonal edges) just like on a pocket calculator.
[snip]
Thank you for this reply.
I'm afraid the div solution would get complicated, as I want to display
complex numbers such as 123,567.89.
Maybe the font solution would be best. But I see no font for 7-bar
displays in Windows. Is there any way of seamlessly downloading a font
onto the user's PC?

I hope not!

Why not?

Many users like to have a feeling of control over what resides on their
hard disk. Things getting seamlessly downloaded is at odds with this
requirement.

Even apart from the obvious security problems, it's a practical thing
too. Suppose one day my text editor stops working properly. It is
easier to trace the cause of the problem if I don't have to consider the
possibility that a web site I visited altered my fonts installation.

I just thought of another way you could do your calculator digits. Since
you only need 10 digits plus comma and decimal point, you could just
make 12 images (gif, png etc.) of the digits and arrange those on your
page in the proper sequences.
What I meant by seamlessly was that I did not want the user to have to
follow a 9-point procedure involving rebooting, opening the register or
the like. If Imust ask his or her permission, that's no problem for me.

Well if you're sure... I don't know the application of your page, but if
it's on the www, I'm not sure how many users will be inclined to install
a special font just to look at it. It's just not what people expect to
have to do.

Also I don't know if it's possible to install a font on Windows without
the 9-point procedure involving rebooting, but I don't know much about
Windows. You may have some luck asking on a Windows NG.
OK I'll do that. I'll use the gif idea if I can't get it to work
otherwise. Thanks for the input anyway.

Francis

Oct 30 '06 #9
In message <11**********************@i42g2000cwa.googlegroups .com>, Mon,
30 Oct 2006 00:22:55, vi**@systar.fr writes
>I would like to display digits with a 7-bar display, as in a pocket
calculator.
Any ideas about how to do this?
<URL:http://www.merlyn.demon.co.uk/js-anclk.htm#Txtradiobutton Do3
does that, near enough; you'd just have to change variable "Art". But
it's not 7-segment technology. Unicode should have a "black brick"
character, to improve contrast.

Section Digital on the same page will also do it, if you redraw the
figure graphics.
To really annoy the purists, set up a Table with rows and columns of
element width/height proportional to, say, 1, 3, 1, 2 repeating 3, 1
and set the 3*1 & 1*3 elements to black background for each ON segment.
Or something like that.

It's a good idea to read the newsgroup and its FAQ. See below.

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6
<URL:http://www.jibbering.com/faq/>? JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.
Oct 31 '06 #10
vi**@systar.fr wrote:
[...]
Maybe the font solution would be best. But I see no font for 7-bar
displays in Windows. Is there any way of seamlessly downloading a font
onto the user's PC?
In theory there is - see
http://www.w3.org/TR/REC-CSS2/fonts....t-descriptions. In practice
Internet Explorer is the only browser I know which supports @font-face - see
http://www.microsoft.com/typography/...bedding/weft3/.
There are also other ideas - see http://www.mikeindustries.com/sifr/ for
example.

Boris
Nov 2 '06 #11
vi**@systar.fr wrote:
>
Ben C wrote:
>On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
>
Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.frwrote:
Hi,

I would like to display digits with a 7-bar display, as in a
pocket calculator.
Any ideas about how to do this?

Just find a font like that?

Or you could do it with CSS tricks and some JS (if you needed to
update the display). I would use borders for the actual "bars"
since they are mitred (diagonal edges) just like on a pocket
calculator.
[snip]
Thank you for this reply.
I'm afraid the div solution would get complicated, as I want to
display complex numbers such as 123,567.89.
Maybe the font solution would be best. But I see no font for
7-bar displays in Windows. Is there any way of seamlessly
downloading a font onto the user's PC?

I hope not!

Why not?

Many users like to have a feeling of control over what resides on
their hard disk. Things getting seamlessly downloaded is at odds with
this requirement.

Even apart from the obvious security problems, it's a practical thing
too. Suppose one day my text editor stops working properly. It is
easier to trace the cause of the problem if I don't have to consider
the possibility that a web site I visited altered my fonts
installation.

I just thought of another way you could do your calculator digits.
Since you only need 10 digits plus comma and decimal point, you could
just make 12 images (gif, png etc.) of the digits and arrange those on
your page in the proper sequences.

What I meant by seamlessly was that I did not want the user to have to
follow a 9-point procedure involving rebooting, opening the register or
the like. If Imust ask his or her permission, that's no problem for me.

Well if you're sure... I don't know the application of your page, but if
it's on the www, I'm not sure how many users will be inclined to install
a special font just to look at it. It's just not what people expect to
have to do.

Also I don't know if it's possible to install a font on Windows without
the 9-point procedure involving rebooting, but I don't know much about
Windows. You may have some luck asking on a Windows NG.

OK I'll do that. I'll use the gif idea if I can't get it to work
otherwise. Thanks for the input anyway.

Francis
There was a JavaScript file from one of the JavaScript sites that did this,
years ago. It used separate images for either the segments or the digits.

Doug.

--
We can't stop crime, so why don't we legalize it and
tax it out of existence?
- Will Rogers.

Nov 4 '06 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: StepH | last post by:
Hi, I'm building a little application, which the goal is to: 1./ Collect data via Serial line and or via a file (for playback). 2./ Display these data as graph, oscilloscope, ... How manage...
1
by: FrankBooth | last post by:
Hello, I have a list of names, and when I click ona name I want the extar info to show and then I want to clcik and hide it again. I have the following HTML which works perfectly if I use one...
23
by: Mat | last post by:
<div id="container"> <div id="main"> <div id="header"> <p class="Address">123 Fake Street, </p> <p class="City">Crazy City, </p> <p class="Province">Ontario </p> <p class="PostalCode">H0H...
3
by: shreddie | last post by:
Could anyone assist with the following problem? I'm using JavaScript to hide/show table rows depending on the option selected in radio buttons. The script works fine in IE but in Firefox the...
0
by: Ferry Boender | last post by:
Hi, I'm relatively new to Xlib programming, and I ran into a little problem. I'm trying to insert keypress events into a X window. The following code works: ...
15
by: Markus Ernst | last post by:
Hi When toggling an element on and off by setting its display property via DOM access, display:none is valid for all kinds of elements, but I can't find anything about a generic value for...
1
by: RonY | last post by:
I have a dropdown which calls SetTimePeriod method on change the selection. In the JS function, I reset the field style.display based on what the selection is. This works fine with IE but not working...
1
by: rbinington | last post by:
Hi, I am trying to write a DNN module that has the ability to insert articles into an article repository. I want the users to be able to move pages around and enter text into the FCKEditor. I...
2
by: Steve Richter | last post by:
I would like to use display:inline and other CSS attributes to build an entry form. Where the heading to the left of the text box is always a set width. It is not working so I am experimenting...
15
by: cssExp | last post by:
hello, Rather than going on a wild explanation on what's the the problem, it'll be much quicker and easier if i let you look at it yourself, so I'll post my page source (actual contents taken out,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.