Adding elements to a layout with a theme

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
TomM
New User
Posts: 6
Joined: Mon Nov 07, 2016 12:09 pm
First Name: Tom
Last Name: M
Company Name: Hal Leonard
Contact:

Adding elements to a layout with a theme

Post by TomM »

Im trying to add elements to a layout in my theme, but I cant see how this would be done.

When I use the designer to drag an element into a layout, I dont see any properties that are changed in either the layout or the element.

Is there some hidden property that specifies which layout an element is inside of?



Thanks
User avatar
Glenn
Profound Logic Staff Member
Posts: 124
Joined: Mon Apr 14, 2014 4:08 pm
First Name: Glenn
Last Name: Hopwood
Company Name: Profound Logic Software
State / Province: Ohio
Country: United States
Contact:

Re: Adding elements to a layout with a theme

Post by Glenn »

Tom,

There are 2 properties involved in placing an element inside a layout. The first one is called "layout" and needs to contain the "id" of the layout widget. The other one is called "container" and it should be set to "1". Note that the positional properties (top, left, etc...) of the element contained in the layout are based on the inside of the layout not on the page.

Glenn
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Adding elements to a layout with a theme

Post by Scott Klement »

A few notes on what Glenn said:

1) Yes, these properties (layout and container) are not visible in the Visual Designer, so you can think of them as "hidden".

2) The "container" property should NOT always be "1", it controls which section of the layout you want the item placed inside. In the Mobile layout, for example, there are 3 sections.. container=1 is the top bar, container=2 is the middle section, container=3 is the bottom bar.

The easiest way to see how this works is to create a throwaway display in the Visual Designer and then use SaveAs/LocalFile. Open the resulting file in Notepad and you can see exactly what properties the designer sets in JSON format.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest