iOS Question Designer Script and View Properties

CryoGenID

Active Member
Licensed User
Longtime User
Hello everybody,

I am currently struggling with the designer script:
I have two variants defined, one for iPad and one for iPhones.
What I have already found out is that you can use the designer to reposition the elements per variant.
But what you cannot do is e.g. set the font size or border width via the designer directly as it then affects all variants.

So I have used the designer script to set the textsize for each variant. That seems to work perfectly.
But here comes my problem:
Not all settings of the views are available inside the designer script :-(
How would I e.g. set the border width of a button inside the designer script?

Thanks a lot and best regards,

Chris
 

CryoGenID

Active Member
Licensed User
Longtime User
Hello Erel,

sorry for my late response. Work is crazy at the moment...

I have tried your idea to get the current variant:
---
Log(Page_Login.RootPanel.LoadLayout)
---

But I only get an error that there are parameters missing...

Would you please be so kind as to help me to find out which variant the user currently uses (and then I can set some things based on the variants)?

Thanks a lot and best regards,

Chris
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
It should be Log(Page_Login.RootPanel.LoadLayout("the layout file that you are loading"))

However this suggestion is less relevant for B4i as the chosen variant can be later changed (unlike in B4A).

You will need to handle the page Resize event and change the borders based on the width and height.

I recommend you to create as few as possible variants. It is better to use the designer script and anchors.
 
Upvote 0

CryoGenID

Active Member
Licensed User
Longtime User
Hello Erel,

thanks for your reply.
Hm... If I understand you correctly then I cannot easily find out in which variant the users device is running?
Background info:
I want to download different background images based on the variant of the users device when I fill the page
with content.

Currently I have a variant for iPhones and iPads...
Or can I do that somehow?

Thanks a lot again and best regards,

Chris
 
Upvote 0
Top