Anyone know how to put mixed fonts on an object? I want to have a superscript character contained in the text on my button, for instance to denote "power of" x "to the power of" y, without having to use the ugly x ^ y
I'm supposing this can't be done as I suspect that you can only use plain text in a single font. But if it can be, I'd like to figure out how.
If anyone knows or could figure it out, I'd be greatful to know.
Cheers
6 1071
If this is a windows program, you can do ownerdraw stuff and draw your own strings on the button. That way you can change fonts whenever you want?
If this is a windows program, you can do ownerdraw stuff and draw your own strings on the button. That way you can change fonts whenever you want?
I've not looked into this yet. OwnerDraw you say... I'll check it out, thanks. Any good resources on that? From the few sites I've found discussing it, it seems like a lot of work just to add a floating y into the text... I may just skip it and put a picture on the button cheesy as that is. :oP
Well, by "ownerdraw" I pretty much just mean handling the paint method yourself.
It's just a Graphics object, so you are free to draw an image on there or anything else you want as well.
Well, by "ownerdraw" I pretty much just mean handling the paint method yourself.
It's just a Graphics object, so you are free to draw an image on there or anything else you want as well.
When you say the paint method though, that to me means that if I want it to have that pretty XP look, I've gotta handle all that too? It would be nice if I could OwnerDraw just the text bit of the object, that would be nice...
you could probably do like base.Paint() or something before your drawing stuff?
Although I guess you would have to inherit the button class and make a custom button class for that.
you could probably do like base.Paint() or something before your drawing stuff?
Although I guess you would have to inherit the button class and make a custom button class for that.
Hmm, I'll check that out, maybe that's worth looking at. Cheers
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Perttu Pulkkinen |
last post by:
No questions, but just consider if this is useful to you:-) but of course
feedback & corrections are welcome.
function php_mixed_to_js_value($jsname, $mixed)
{
if(is_null($mixed))
{ return "\n...
|
by: |
last post by:
Hi,
Why doesnt the runtime set the object to null when the finalizer has been
called? Wouldnt this prevent a slew of bugs?
I just called the obj.__dtor(); from a MC++ wrapper class I made and...
|
by: L |
last post by:
Hi there,
Does C# support OpenType fonts? My c# application is not
recognizing OpenType fonts.
Thanks,
Lalasa.
|
by: Maxim Yegorushkin |
last post by:
The following code:
#include <iostream>
class base
{
private:
virtual ~base()
{
std::cout << "virtual ~base()\n";
|
by: Ioannis Vranos |
last post by:
So to be more excited, will it be possible to use standard library
containers with handles in VC++ 2005/.NET 2.0 era?
Like this:
vector<Button ^>buttonArray;
|
by: Crirus |
last post by:
Is there a way to catch undisposed objects that only occupy memory, in order
to call dispose for them?
I may be forgetting to dispose fonts, pens, graphics sometimes... how to
find them (without...
|
by: Mike Meyer |
last post by:
It seems that the distinction between tuples and lists has slowly been
fading away. What we call "tuple unpacking" works fine with lists on
either side of the assignment, and iterators on the...
|
by: Atul |
last post by:
Hi,
I have installed a truetype font (.ttf) on a linux machne (SUSE linux
10, KDE) by copying it to my .fonts folder. I can use the font in all
applications like open-office and firefox browser....
|
by: David |
last post by:
Hi list.
I've never used unicode in a Python script before, but I need to now.
I'm not sure where to start. I'm hoping that a kind soul can help me
out here.
My current (almost non-existant)...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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...
|
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: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |