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 » Button Label
Button Label [message #8047] Mon, 05 February 2007 20:36 Go to next message
MikeyV is currently offline  MikeyV
Messages: 20
Registered: February 2007
Promising Member
I'm sure this is something simple, but I couldn't find an answer using the forum search, or in the examples.

How do I turn on word wrapping for a button?
Re: Button Label [message #8060 is a reply to message #8047] Mon, 05 February 2007 23:08 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
MikeyV wrote on Mon, 05 February 2007 14:36

I'm sure this is something simple, but I couldn't find an answer using the forum search, or in the examples.

How do I turn on word wrapping for a button?


One option to get text of button more interesting is to make it QTF. You can do it for most labels by prepending text with "\1" (works in Layout designer too), in that case text is interpreted as QTF.

Mirek
Re: Button Label [message #8065 is a reply to message #8047] Mon, 05 February 2007 23:55 Go to previous messageGo to next message
MikeyV is currently offline  MikeyV
Messages: 20
Registered: February 2007
Promising Member
Quote:

You can do it for most labels by prepending text with "\1" (works in Layout designer too), in that case text is interpreted as QTF.


I can't seem to figure out how to do this in the layout designer. Where exactly do I put the \1?

If I have
SetLabel(t_("IST/ISR Input Screen"))
where do I tell it to use QTF?

I'm sorry, I just don't understand QTF/RTF at all. I thought it would be simpler to turn on word wrap in a button instead of having to increase the size of the button or reduce the text size to make it fit.
Re: Button Label [message #8067 is a reply to message #8047] Tue, 06 February 2007 00:31 Go to previous messageGo to next message
MikeyV is currently offline  MikeyV
Messages: 20
Registered: February 2007
Promising Member
Okay, after playing around a bit, I can get the text to wrap, but it's not optimal, and it looks bad, as the second line doesn't center.

Before:
SetLabel(t_("IST/ISR Input Screen"))

After:
SetLabel(t_("IST/ISR Input \n Screen"))


Forgive my questions, but it's been about 5 years since I've done any C++ programming, and 5 years ago I was still learning.

I don't have a very good handle on things like structs, vectors, templates, and several other things.
Re: Button Label [message #8068 is a reply to message #8067] Tue, 06 February 2007 01:00 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
SetLabel(t_("\1IST/ISR [* Input]&Screen"))
Re: Button Label [message #8069 is a reply to message #8047] Tue, 06 February 2007 01:20 Go to previous message
MikeyV is currently offline  MikeyV
Messages: 20
Registered: February 2007
Promising Member
I see. Thanks for the tip!
Previous Topic: Help with a possible design problem?
Next Topic: Use of Layouts in tabs under topwindow
Goto Forum:
  


Current Time: Wed May 08 00:23:08 CEST 2024

Total time taken to generate the page: 0.02702 seconds