artem_niko Posted December 6, 2022 Share Posted December 6, 2022 Good afternoon! How can I make Uibutton appear on top of all other components? Bring to front doesn't help. I placed the button on the main form simply, I need it to be, as it were, on top of all the other components, in particular on top of the UniPanel, and the UniPanel would be, as it were, behind the button. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 6, 2022 Share Posted December 6, 2022 Hello, OK, what if you insert a button in a UniPanel !? Quote Link to comment Share on other sites More sharing options...
artem_niko Posted December 6, 2022 Author Share Posted December 6, 2022 4 minutes ago, Sherzod said: Hello, OK, what if you insert a button in a UniPanel !? Yes, I know that it can be placed in the center of the panel and that's it. But, I need to change the size of the panel itself, then in this case, the button will also shrink. And I just need to find out how to make the panel, and let the button be what it is and does not depend on the height of the panel. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 6, 2022 Share Posted December 6, 2022 Your case is not very clear to me. There is also CSS z-index property... Quote Link to comment Share on other sites More sharing options...
artem_niko Posted December 6, 2022 Author Share Posted December 6, 2022 3 minutes ago, Sherzod said: Ваш случай мне не очень понятен. Существует также свойство CSS z-index... To be honest, I do not know how to explain it even easier ... I'll try to draw: Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 6, 2022 Share Posted December 6, 2022 Quote Link to comment Share on other sites More sharing options...
artem_niko Posted December 6, 2022 Author Share Posted December 6, 2022 1 minute ago, Sherzod said: Yes. Something like this... Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 6, 2022 Share Posted December 6, 2022 2 minutes ago, Sherzod said: You can use this trick: UniPanel1 -> UniPanel2 -> UniButton1 UniPanel2 -> BorderStyle = ubsNone Floating = True UniButton1 -> Align = AlClient Quote Link to comment Share on other sites More sharing options...
artem_niko Posted December 6, 2022 Author Share Posted December 6, 2022 5 minutes ago, Sherzod said: You can use this trick: UniPanel1 -> UniPanel2 -> UniButton1 UniPanel2 -> BorderStyle = ubsNone Floating = True UniButton1 -> Align = AlClient UniButton1 on the UniPanel2? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 6, 2022 Share Posted December 6, 2022 Yes: 6 minutes ago, Sherzod said: UniPanel1 -> UniPanel2 -> UniButton1 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 6, 2022 Share Posted December 6, 2022 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 6, 2022 Share Posted December 6, 2022 UniPanel2 - set the sizes by the button... Quote Link to comment Share on other sites More sharing options...
artem_niko Posted December 6, 2022 Author Share Posted December 6, 2022 6 minutes ago, artem_niko said: UniButton1 on the UniPanel2? 12 minutes ago, Sherzod said: You can use this trick: UniPanel1 -> UniPanel2 -> UniButton1 UniPanel2 -> BorderStyle = ubsNone Floating = True UniButton1 -> Align = AlClient OK, I took your advice and played with the panels. It seems like it turned out, I'll finish it and try it myself. And why can't a UniButton without a panel be displayed on top? Quote Link to comment Share on other sites More sharing options...
artem_niko Posted December 6, 2022 Author Share Posted December 6, 2022 And the last question on this topic: how can I make my UniPanel2, on which my UniButton1 is located, always be located at the bottom of the MainForm, in the center? Here is the code when you can center relative to if UniPanel2 had to be centered on UniPanel1: UniPanel2.Left:=(UniPanel1.ClientWidth - UniPanel2.Widhth) div 2; UniPanel2.Top:=(UniPanel1.ClientHeight - UniPanel2.Height) div 2; but, I need to place UniPanel2 in the center, at the bottom, of the MainForm... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.