473,387 Members | 1,575 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,387 software developers and data experts.

Combining a graphic with text on a button

Rod
Hi,

Does anyone know of a way to combine an icon with text on a pushbutton
without venturing too deeply into the murky world of the graphics library.

The icon is a gif loaded from a file but the text is read from a resource
and may be in any one of several languages so I probably need to create the
button logo on the fly using text in a string.

Any suggestions on how I can combine the two?
Jun 29 '06 #1
2 1319
how bout this:

<button>hi<img src="http://groups.google.ca/groups/img/threadsub_y.gif"
/></button>

cheers

neil
Rod wrote:
Hi,

Does anyone know of a way to combine an icon with text on a pushbutton
without venturing too deeply into the murky world of the graphics library.

The icon is a gif loaded from a file but the text is read from a resource
and may be in any one of several languages so I probably need to create the
button logo on the fly using text in a string.

Any suggestions on how I can combine the two?


Jun 29 '06 #2
You can achieve this by pure css:

input.MyButton{
background:url(icon.gif);
background-posision:left;
padding-left:20px;
}

That's it, you can play around with other css attributes to make your
button the way you want.

Ah, this approach works with links too.
Rod wrote:
Hi,

Does anyone know of a way to combine an icon with text on a pushbutton
without venturing too deeply into the murky world of the graphics library.

The icon is a gif loaded from a file but the text is read from a resource
and may be in any one of several languages so I probably need to create the
button logo on the fly using text in a string.

Any suggestions on how I can combine the two?

Jun 29 '06 #3

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

Similar topics

20
by: Joe exCSSive | last post by:
Hi, folks: I'm back...and now I'm really stuck !! I have a graphic ( http://www.sundialontario.com/images/makeitatable.jpg ) that I would like to convert to CSS and I'm not sure how to do...
4
by: David. E. Goble | last post by:
Hi All; I am trying to combine to picture galleries onto te one page. But its not quite working. Here is what I have so far. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">...
11
by: laredotornado | last post by:
Hello, Is it possible, instead of having the button "Browse" for the HTML <input type="file"> element, to have a graphic in its place? How would this be done? Thanks, - Dave
2
by: David Scemama | last post by:
Hi, I'm looking for a way to display semi graphic characters in a multi line text control or in a rich text control. I've tried with all the characters of the extended ASCII table (code page...
2
by: hp3k | last post by:
Hi, I'm a newbie to VB .Net and am unable to locate an example of combine two different font types (Arial and Wingdings 3) in a display (text) string. Does anyone have an example of combining...
1
by: hamil | last post by:
I am trying to print a graphic file (tif) and also use the PrintPreview control, the PageSetup control, and the Print dialog control. The code attached is a concatination of two examples taken out...
6
by: randy1200 | last post by:
I'm using Visual Studio 2005 and C#. I need to print a WinForm used for data entry as a graphic. In other words, I need to print the exact WinForm the user sees on the screen. I searched through...
4
by: André | last post by:
Hi, I try to create and render a graphic among other objects like e.g. tables, labels, buttons. The tables are not a problem, neither the graphic. My problem is that i can't render both...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...

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.