1. Pau Haro
  2. PowerBuilder
  3. Wednesday, 11 November 2020 10:05 AM UTC

Hello everyone, 

Im working on datawindow style, I have a datawindow with big fields, and I need the text to be vertically centered inside the fields. Is there any way to do it? You can see the datawindow down below.

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 11 November 2020 16:49 PM UTC
  2. PowerBuilder
  3. # 1

Hi Pau,

As far as I know, you can only center texts horizontally, but what you could do, is:

If your text is "myText"

change it to: "~rmyText"

(so preceding the text with the character you get when you do a ALT+126, followed by a 'r' and than the text)

If you make the control in such a way that it has a height in which 3 lines will fit, the text will appear vertically centered.

(would be a nice enhancement request by the way).

(small detail: you have a typo: "Sessió Porgamada" has to be "Sessió Programada", unless mi Catalá is really bad.)

saludos

Comment
  1. Pau Haro
  2. Thursday, 12 November 2020 08:40 AM UTC
Hi Miguel,

I have read your two answers, I will try to do something with the advice you have given me, later I will post the result of how the datawindow looks. Thank you for letting me know about the spelling error, you have not made a mistake at all, it is "Sessió Programada".
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 11 November 2020 17:36 PM UTC
  2. PowerBuilder
  3. # 2

Now that I read your question again ...

You want to vertically center the text in "fields", not in "text2 objects.

In that case you could try to apply a format like "~r[general]" (havent' tried it myself) or maybe easier, do something similar to what you already do in the summary:

no border for the field, transparent background colour and center it with a text object below which will have the background and border you want.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.