Recent

Author Topic: TStaticText  (Read 14295 times)

Spribo

  • New Member
  • *
  • Posts: 41
TStaticText
« on: November 12, 2009, 08:31:03 pm »
I have some text that I want to appear in a TStaticText control, but part of it isn't displayed. How can I increase the amount of text the TStaticText displays?

alter

  • Full Member
  • ***
  • Posts: 151
    • KSP website
Re: TStaticText
« Reply #1 on: November 12, 2009, 09:30:12 pm »
TStaticText.AutoSize?

Spribo

  • New Member
  • *
  • Posts: 41
Re: TStaticText
« Reply #2 on: November 12, 2009, 09:41:26 pm »
Well, its size has to remain constant.

Spribo

  • New Member
  • *
  • Posts: 41
Re: TStaticText
« Reply #3 on: November 13, 2009, 09:46:18 am »
Please, I do need advice!

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1934
Re: TStaticText
« Reply #4 on: November 13, 2009, 11:28:19 am »
Please, I do need advice!

I think we don't understand what you mean.
How can you increase the amount of text with constant dimensions?
Problably decrease the Font.Size? ;-)

alter

  • Full Member
  • ***
  • Posts: 151
    • KSP website
Re: TStaticText
« Reply #5 on: November 13, 2009, 03:52:01 pm »
Please, I do need advice!

I think we don't understand what you mean.
How can you increase the amount of text with constant dimensions?
Problably decrease the Font.Size? ;-)
I think he means word wrapping but I don't think that this class supports it. If that is the case then maybe TLabel would be better choice if possible.

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1934
Re: TStaticText
« Reply #6 on: November 13, 2009, 04:03:36 pm »
I think he means word wrapping but I don't think that this class supports it.

It does, at least on GTK2. I think Spribo is using Linux.

Spribo

  • New Member
  • *
  • Posts: 41
Re: TStaticText
« Reply #7 on: November 13, 2009, 04:36:28 pm »
Yes, that's right! I use Linux Ubuntu 9.10.

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1934
Re: TStaticText
« Reply #8 on: November 13, 2009, 05:19:26 pm »
Yes, that's right! I use Linux Ubuntu 9.10.

Good. But I guess we still don't know what your problem is.
You could describe it better or attach a screenshot or.....

Spribo

  • New Member
  • *
  • Posts: 41
Re: TStaticText
« Reply #9 on: November 13, 2009, 05:24:14 pm »
Well, I want 70 characters to be displayed in a TStaticText that has to have a constant size. But only 50 of them are displayed. So I want to make it display 70 characters, with its size unchanged!

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1934
Re: TStaticText
« Reply #10 on: November 13, 2009, 05:32:39 pm »
Well, I want 70 characters to be displayed in a TStaticText that has to have a constant size. But only 50 of them are displayed. So I want to make it display 70 characters, with its size unchanged!

Please attach a screenshot. I don't know what you mean.
You have 70 chars of non-wrappable text on one line? Or is height the problem?
What if you decrease font size as mentioned above?
How should the result look (in your dreams) ? Scrollbars?
Which widgetset are you using? GTK2?
Please make a decent description of your problem, this is getting boring ;-)

Spribo

  • New Member
  • *
  • Posts: 41
Re: TStaticText
« Reply #11 on: November 13, 2009, 05:58:19 pm »
*Yes, GTK2.
*I have attached an attachment: in the central textbox, only part of my text is displayed.

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1934
Re: TStaticText
« Reply #12 on: November 13, 2009, 06:14:36 pm »
I have attached an attachment: in the central textbox, only part of my text is displayed.

I don't know. I can't reproduce this.
Does it work with english only text?
Does it work with standard font?

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1934
Re: TStaticText
« Reply #13 on: November 13, 2009, 06:39:18 pm »
What if you try a TLabel (WordWrap=true, Autosize=false)?
I think it should work better.

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1934
Re: TStaticText
« Reply #14 on: November 13, 2009, 06:54:08 pm »
Yes there is a problem in this area. I don't know if it is exactly what you are experiencing, but might be related.
I wrote a bug report: http://bugs.freepascal.org/view.php?id=15078

In the meantime use TLabel.

 

TinyPortal © 2005-2018