#1 2016-11-25 14:22:36

starin
Guest

Set the [App.TextDirection] & [App.LanguageCode] variables in runtime

Hi,

How to set the App TextDirection from ltr to rtl with Codes ?

thanks .

#2 2016-11-25 14:44:57

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,715
Website

Re: Set the [App.TextDirection] & [App.LanguageCode] variables in runtime

Hello starin,

I think that understand what the problem is. I update App Builder right now in order to fix a mistake that doesn't allow us to change the values of the [App.LanguageCode] and [App.TextDirection] in runtime. Now you can change such variables and therefore the appropiate changes are applied to the application.

So update your App Builder copy starin and, please, consider to buy one or more App Builder licenses!

Offline

#3 2016-12-18 11:48:16

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,715
Website

Re: Set the [App.TextDirection] & [App.LanguageCode] variables in runtime

Hello yosik,

Yes; apparently the RTL changes doesn't affect to the Push butons (and other similar controls) because their text is centered in the control. If you place an Input control, for example, below the button, you can see how the RTL made the expected text direction changes. I am not sure if we can go ahead in the buttons case, since, as I say, their text appear centered in the control, no matter if the text direction is LTR (Left To Right) or RTL (Right to Left).

Offline

#4 2016-12-18 12:41:08

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,715
Website

Re: Set the [App.TextDirection] & [App.LanguageCode] variables in runtime

Hello yosik,

yosik wrote:

Hi,
Yes, I see that, thanks.
And I also see that this RTL or LTR setup is project wide, which means that if I have some elements I need to be RTL and others which I want LTR, I cannot have it both ways...
Is there a way to setup the bidi parameter? and/or add a per element rule (RTL or LTR)?
Thanks
Yossi

Honestly I am not experience in RTL languages. Right now the language direction is established using the appropiate "dir" attribute for the HTML tag of the applications. Maybe it's the common way, that is, normally we no need to mis RTL and LTR, but I can be wrong.

Anyway, when we talk about App Builder's controls, we talk about HTML controls, then, if a control accept the "dir" attribute, there is no problem to set it in the proper way. For example, the below code set the "dir" attribute for an "Input1" control:

SetAttribute "Input1" "dir" "RTL"

I don't know if this can help you in something but I hope so.

Offline

#5 2016-12-18 14:15:57

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,715
Website

Re: Set the [App.TextDirection] & [App.LanguageCode] variables in runtime

Hello Yossi,

yosik wrote:

It did help, thanks.
So to understand, what does the Text Direction, under the App Option, do? If I can set the attribute I want per element, why is there a "global setting"?
Thanks
Yossi

Because that option determine the "dir" attribute of the application's main HTML tag, which is the way to indicate the text direction for all the application's views & controls.

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.