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

Objects and mixed fonts

balabaster
797 Expert 512MB
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
Aug 29 '08 #1
6 1071
Plater
7,872 Expert 4TB
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?
Aug 29 '08 #2
balabaster
797 Expert 512MB
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
Aug 29 '08 #3
Plater
7,872 Expert 4TB
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.
Aug 29 '08 #4
balabaster
797 Expert 512MB
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...
Aug 29 '08 #5
Plater
7,872 Expert 4TB
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.
Aug 29 '08 #6
balabaster
797 Expert 512MB
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
Aug 29 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

3
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...
13
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...
4
by: L | last post by:
Hi there, Does C# support OpenType fonts? My c# application is not recognizing OpenType fonts. Thanks, Lalasa.
35
by: Maxim Yegorushkin | last post by:
The following code: #include <iostream> class base { private: virtual ~base() { std::cout << "virtual ~base()\n";
13
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;
7
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...
66
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...
1
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....
2
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)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
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...
0
agi2029
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,...

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.