Mark Mickunas Posted June 20, 2023 Share Posted June 20, 2023 Convert:|-----------------|-----------||panel1 |panel3 || | ||-----------------| ||panel2 | || |------------|| |panel4 ||-----------------|-----------|panel1 coords (0,0): (458,0): (0,247): (458,247):panel2 coords (0,247): (458,247): (0,645): (458,645):panel3 coords (458,0): (1458,0): (458,503): (1458,503):panel4 coords (458,503): (1458,503): (458,645): (1458,645):To:layout.BeginSideBySideSection()layout.BeginStackedSection(31)layout.Add(panel1,38)layout.Add(panel2,62)layout.EndSection()layout.BeginStackedSection(69)layout.Add(panel3,78)layout.Add(panel4,22)layout.EndSection()layout.EndSection() Link to comment Share on other sites More sharing options...
Fredrik Rosell Posted June 21, 2023 Share Posted June 21, 2023 Hello Mark,I was unable to find a good solution for this either so I reached out to one of the developers of this functionality. His answer was that he does not believe this general issue can be solved using the available API:s.So, I'm afraid I can only point you to the TIBCO Ideas Portal (https://ideas.tibco.com) and suggest that you create an idea for this. Note: I should mention that this is based on some speculation on our end of what your exact use case is though - if you describe it in more detail, it's possible that some solution can be identified (and others here in the community might have ideas). Link to comment Share on other sites More sharing options...
Mark Mickunas Posted June 21, 2023 Author Share Posted June 21, 2023 Thank you so much for responding, Fredrik. I agree the API is not the main impediment. I feel this is mostly an algorithmic problem. I have a python script hundreds of lines long trying to code a solution and am still not there. I have dug out old programming textbooks and reviewed graphing and linear algebra matrix techniques but have come up empty. Link to comment Share on other sites More sharing options...
Matt Stahl Posted June 21, 2023 Share Posted June 21, 2023 Hi Mark,The proportion arguments to LayoutDefinition.BeginStackedSection(Visual, Single) and LayoutDefinition.BeginStackedSection(Single) should be passed as decimal values. You should get the desired layout using the following (notice the decimal points):layout = LayoutDefinition()layout.BeginSideBySideSection()layout.BeginStackedSection(.314)layout.Add(panel1,.38)layout.Add(panel2,.62)layout.EndSection()layout.BeginStackedSection(.686)layout.Add(panel3, .78)layout.Add(panel4, .22)layout.EndSection()layout.EndSection()page.ApplyLayout(layout)Of course, the final coordinates depend on the application window size. Did I understand your request correctly? Link to comment Share on other sites More sharing options...
Mark Mickunas Posted June 21, 2023 Author Share Posted June 21, 2023 Sorry – no. I already know how to use GetVisualBounds to get the coordinates for all panels and the Layout api to set up a page. My question was getting from any set of coordinates to an appropriate Layout to recreate the page. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now