Welcome! Log In Create A New Profile

Advanced

[WM24] Change the horizontal alignment of a Label by programming in iOS

Posted by Popoy 
[WM24] Change the horizontal alignment of a Label by programming in iOS
March 07, 2020 08:07PM
Hello,
When initializing a label I have the following code:
MySelf..HorizontalAlignment = haRight
And I would like to find its equivalent for iOS even in swift or Objective C
Thank you for your help
If it's only for one field, an easy workaround is to use two fields, one left aligned, the other right aligned, and make visible the one you need.

If it's for all your fields, and you are talking about displaying a right to left language, then it's in the languages functions, not the fields one.
Re: [WM24] Change the horizontal alignment of a Label by programming in iOS
March 07, 2020 11:59PM
Argus, thank you for your interest.
There is no language function in iOS to do what I ask.
In addition, the ..TextDirection property is only valid for States.
I have a lot of fields to do.
Re: [WM24] Change the horizontal alignment of a Label by programming in iOS
March 08, 2020 08:04AM
Hi, printing of labels with iPrint(...) commands etc. only - not reports. Then you will have the ability to move all fields of the label to the left or right as desired. The iXPos(...) element of the iPrint / iLine etc functions have to contain a variable for hortizontal adjustment.

Kind regards,
Guenter Predl
office@windev.at
Re: [WM24] Change the horizontal alignment of a Label by programming in iOS
March 08, 2020 09:06AM
We misunderstood each other,
I don't want to make an impression.
I'm just trying to find the equivalent of my code for several windows.
I don't speak English and it's an automatic translation.
Re: [WM24] Change the horizontal alignment of a Label by programming in iOS
March 08, 2020 09:32AM
Hi, it's even easier then! Each control has a value for its horizontal position:

MyEDITControl..x += HorizontalAdjustment

Kind regards,
Guenter Predl
office@windev.at
Re: [WM24] Change the horizontal alignment of a Label by programming in iOS
March 08, 2020 10:03AM
No, my code is not to change the position of a button or a label but the position of the text in the label.
Right, Left that's all.
Re: [WM24] Change the horizontal alignment of a Label by programming in iOS
March 10, 2020 09:04PM
My horizontal framing problem is solved.
These were not errors but warnings that the constants do not exist on iOS.
I replaced haLeft by 0 and haRight by 2 and it works on my iphone 8.
Why were the constants not created for ios?
Proof that the pcsoft tests leave something to be desired.
Author:

Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: