Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 4 of 4 total |
How best to achieve this ? |
Thu, Mar 30 2017 6:03 AM | Permanent Link |
kamran | Hi
So the problem is this: 1. Given a layout of say 10 rows and 10 columns (100 squares(50 x 50 pixels)) which can be panels / buttons. 2. How best to create them at "runtime" at a given position (using row and column as parameters) ? say 1st button at coordinate (R,C) : 2,4 2nd button at coordinate (R,C) : 6,2 3rd button at co-ordinate (R,C) : 8,3 etc. so in the above example only three buttons are displayed and only appear at the given co-ordinates / position specified. any ideas or suggestions? regards Kamran |
Thu, Mar 30 2017 6:13 AM | Permanent Link |
Uli Becker | You know how to create buttons at runtime time?
Then it should be quite easy. Just calculate the top and left positions depending on the coordinates. If you have problems: what have you tried til now? Uli |
Thu, Mar 30 2017 6:20 AM | Permanent Link |
Matthew Jones | Uli Becker wrote:
> You know how to create buttons at runtime time? > Then it should be quite easy. Just calculate the top and left positions depending on the coordinates. I agree. Create a panel as the parent, divide the width by the number of columns (cell width), make buttons at those locations, parented on the panel, set their width to the cell width. Repeat calculations for veritical dimension. If you need to access them, you can create an array, set all values to nil, and then assign those that you have present. And to know which button was clicked, use the Tag to assign something that makes sense. Could be (X * 100) + Y or something that you can decode easily, or something more specific like index into array of objects they represent.. -- Matthew Jones |
Thu, Mar 30 2017 6:55 AM | Permanent Link |
kamran | Hi Uli and Matthew
Cool !! I will have a go. Thanks Kamran kamran wrote: Hi So the problem is this: 1. Given a layout of say 10 rows and 10 columns (100 squares(50 x 50 pixels)) which can be panels / buttons. 2. How best to create them at "runtime" at a given position (using row and column as parameters) ? say 1st button at coordinate (R,C) : 2,4 2nd button at coordinate (R,C) : 6,2 3rd button at co-ordinate (R,C) : 8,3 etc. so in the above example only three buttons are displayed and only appear at the given co-ordinates / position specified. any ideas or suggestions? regards Kamran |
This web page was last updated on Thursday, May 23, 2024 at 03:39 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |