likemike Posted May 5, 2021 Share Posted May 5, 2021 Hello! I'm searching for a command, which set a UnimDBGrid to the left position. I need this, because sometimes (grid is part of a carousel) the grid displays the columns somewhere in the middle of the grid when swiping from one carousel page to another. Thanks Mike Link to comment Share on other sites More sharing options...
Sherzod Posted May 5, 2021 Share Posted May 5, 2021 7 minutes ago, likemike said: I'm searching for a command, which set a UnimDBGrid to the left position. I need this, because sometimes (grid is part of a carousel) the grid displays the columns somewhere in the middle of the grid when swiping from one carousel page to another. Hello, Can you please explain in more details? Link to comment Share on other sites More sharing options...
likemike Posted May 5, 2021 Author Share Posted May 5, 2021 OK! Imagine you have a carousel with 2 pages. On the first page you have a UnimDBGrid with one column (a string which is wider than the available space). Now swipe to the 2nd page and back to the 1st page. Now the grid shows the end of the column (you cannot see the beginning). But I wan't that the grid shows the leftmost part of the column (because here is where the string begins). Link to comment Share on other sites More sharing options...
Sherzod Posted May 5, 2021 Share Posted May 5, 2021 57 minutes ago, likemike said: Imagine you have a carousel with 2 pages. On the first page you have a UnimDBGrid with one column (a string which is wider than the available space). Now swipe to the 2nd page and back to the 1st page. Now the grid shows the end of the column (you cannot see the beginning). But I wan't that the grid shows the leftmost part of the column (because here is where the string begins). Okay. Can you make a simple testcase to reproduce? Link to comment Share on other sites More sharing options...
likemike Posted May 5, 2021 Author Share Posted May 5, 2021 No problem. Here it is. Install, compile and start on a smartphone. Then swipe to the 2nd page and then back to the 1st. You will only see the last letters from the companies. Unigui2.rar Link to comment Share on other sites More sharing options...
Sherzod Posted May 5, 2021 Share Posted May 5, 2021 10 minutes ago, likemike said: Unigui2.rar 27.98 kB · 0 downloads Sorry, are you sure you have attached the correct testcase? Link to comment Share on other sites More sharing options...
likemike Posted May 5, 2021 Author Share Posted May 5, 2021 Yes - why do you think it's not correct? Link to comment Share on other sites More sharing options...
Sherzod Posted May 5, 2021 Share Posted May 5, 2021 1 hour ago, Sherzod said: On the first page you have a UnimDBGrid I do not see UnimDBGrid. Link to comment Share on other sites More sharing options...
likemike Posted May 5, 2021 Author Share Posted May 5, 2021 Link to comment Share on other sites More sharing options...
likemike Posted May 5, 2021 Author Share Posted May 5, 2021 OK! Let's try it again... Unigui2.rar Link to comment Share on other sites More sharing options...
Sherzod Posted May 6, 2021 Share Posted May 6, 2021 9 hours ago, likemike said: Unigui2.rar 33.21 kB · 0 downloads Hello, One possible solution: procedure TMainmForm.UnimFormCreate(Sender: TObject); begin UnimCarouselPage1.JSInterface.JSAddListener('activate', 'function() {'+ UnimDBGrid1.JSName +'.getScrollable().scrollTo({x: 0})}') end; Link to comment Share on other sites More sharing options...
likemike Posted May 6, 2021 Author Share Posted May 6, 2021 Great! It works! Thanks a lot!!! Link to comment Share on other sites More sharing options...
Recommended Posts