Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » How do I text overlay an image in a Upp::Button ?
How do I text overlay an image in a Upp::Button ? [message #13756] Sat, 26 January 2008 01:08 Go to next message
jlfranks is currently offline  jlfranks
Messages: 57
Registered: May 2007
Location: Houston, TX, USA
Member
I have a virtual keyboard layed out with Upp Buttons.
The goal is to show an image bitmap keycap that does not
have a letter embedded in it, i.e. a blank key cap.

Next, we want to set the label text with a single letter for
that particular button. The reason for doing this is to avoid
creating tons of keycaps (upper/lower case) for each character set for locals of interest (including Asian).

The problem is that the Button widget lays out the image to one side of the label. We want the text to overlay the image.
The keycap is dark background, and the ink for the text should be white.

Is there a way of accomplishing this short of writing a custom widget?

--jlf
Re: How do I text overlay an image in a Upp::Button ? [message #13780 is a reply to message #13756] Sat, 26 January 2008 14:26 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
jlfranks wrote on Fri, 25 January 2008 19:08

I have a virtual keyboard layed out with Upp Buttons.
The goal is to show an image bitmap keycap that does not
have a letter embedded in it, i.e. a blank key cap.

Next, we want to set the label text with a single letter for
that particular button. The reason for doing this is to avoid
creating tons of keycaps (upper/lower case) for each character set for locals of interest (including Asian).

The problem is that the Button widget lays out the image to one side of the label. We want the text to overlay the image.
The keycap is dark background, and the ink for the text should be white.

Is there a way of accomplishing this short of writing a custom widget?

--jlf


No, but writing custom widget is a trivial task...

In my recent project, exactly this was required (touchscreen application, buttons on screen). We did just that - wrote custom widget. In U++, the base code for button is about 20 lines...

Mirek
Previous Topic: FIX - SizeGrip executes first MenuEntry of MenuBar
Next Topic: header not found by compiler
Goto Forum:
  


Current Time: Mon Apr 29 04:02:30 CEST 2024

Total time taken to generate the page: 0.02835 seconds