473,808 Members | 2,792 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2409
On 2006-10-30, vi**@systar.fr <vi**@systar.fr wrote:
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.fr wrote:
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.fr wrote:
>
Ben C wrote:
>On 2006-10-30, vi**@systar.fr <vi**@systar.fr wrote:
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.fr wrote:

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.fr wrote:
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.fr wrote:
>
Ben C wrote:
>On 2006-10-30, vi**@systar.fr <vi**@systar.fr wrote:
>
Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.fr wrote:
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.fr wrote:

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

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.fr wrote:
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.fr wrote:
>
Ben C wrote:
>On 2006-10-30, vi**@systar.fr <vi**@systar.fr wrote:
>
Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.fr wrote:

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.fr wrote:
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.fr wrote:

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

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

Ben C wrote:
On 2006-10-30, vi**@systar.fr <vi**@systar.fr wrote:
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************ **********@i42g 2000cwa.googleg roups.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.demo n.co.uk/js-anclk.htm#Txtra diobutton 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.c om/faq/>? JL/RC: FAQ of news:comp.lang. javascript
<URL:http://www.merlyn.demo n.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demo n.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.
Oct 31 '06 #10

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

Similar topics

3
2166
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 this ? 1./ Is each "display" must responsible to acquire/read the data ?
1
2676
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 construct, but if I use more that one it issues an object error which states that: ExpCollTxt_ctrl_ex.style is not an object. So the followin piece works fine:
23
3167
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 0H0</p> <p class="Telephone">Telephone: 555-1234 </p> <p class="Fax">Fax: 555-4321</p> </div>
3
10259
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 hidden rows take up page space even though their content is not visible. I have extracted the necessary code as shown below: ************************************************************************
0
1908
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: --8<------------------------------------------------------------ #!/usr/bin/python
15
12496
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 toggling on again. Furthermore, UAs do not recognize the same values. To make a table row visible, IE wants display:block while FF wants display:table-row. Am I missing something? I am looking for something like display:normal
1
9041
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 with Firefox browser. The firefox browser has problem to display a field after its style.display is reset. At the end of the JS function, I printed out the fields style.display value. They are set correctly. How to resovle this? My JS is : ...
1
4536
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 want only one instance of the FCKEditor on the screen at one time so I make tabs that the user can click and I store the values in variables behind the scenes. I change the CSS class on the link that is the currently selected one. I have a really...
2
8691
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 with two divs to get them to render side by side: <div style="width:12em;border: 2px solid #EFCE8C; padding: 0.5em;display:inline;">abc</div> <div style="width:12em;border: 2px solid #EFCE8C; padding:
15
3171
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, of course). <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Language" content="en-us" />
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10628
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10373
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10113
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7651
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5547
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4331
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3859
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3011
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.