dkeene Posted May 6, 2020 Share Posted May 6, 2020 Is there a way with UniGui to place shapes onto a UniContainerPanel simply for visual grouping? Like a Line or Box? Something like TShape... Quote Link to comment Share on other sites More sharing options...
dkeene Posted May 6, 2020 Author Share Posted May 6, 2020 or is there any way to access the canvas to draw upon? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 6, 2020 Share Posted May 6, 2020 5 hours ago, dkeene said: Is there a way with UniGui to place shapes onto a UniContainerPanel simply for visual grouping? Like a Line or Box? Something like TShape... Sorry to clarify. How will it look in VCL for example? Quote Link to comment Share on other sites More sharing options...
dkeene Posted May 6, 2020 Author Share Posted May 6, 2020 Thanks I want to be able to draw a rectangle or something similar on a UniContainerPanel for cosmetic appearance, for example, to group controls together visually. I don't want to add another panel, I just want to draw a line. I suppose I could add a panel with a width of 1 pixel and length of x pixels to simulate a line, and add 3 others to simulate a rectangle, but I'd rather either access the UniContainerPanel.Canvas to draw a rectangle or add something like TShape... Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 6, 2020 Share Posted May 6, 2020 1 minute ago, dkeene said: I want to be able to draw a rectangle or something similar on a UniContainerPanel for cosmetic appearance, for example, to group controls together visually. I don't want to add another panel, I just want to draw a line. I suppose I could add a panel with a width of 1 pixel and length of x pixels to simulate a line, and add 3 others to simulate a rectangle, but I'd rather either access the UniContainerPanel.Canvas to draw a rectangle or add something like TShape... OK, can you make a simple testcase in VCL? Quote Link to comment Share on other sites More sharing options...
dkeene Posted May 6, 2020 Author Share Posted May 6, 2020 Here is an example of using Delphi TBevel which does not HIDE components under it but adds a visual grouping. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 6, 2020 Share Posted May 6, 2020 2 minutes ago, dkeene said: TBevel We can try to create a panel with the ability to customize the borders. Quote Link to comment Share on other sites More sharing options...
dkeene Posted May 6, 2020 Author Share Posted May 6, 2020 no need for fancy borders. However, a panel would hide the elements beneath it. somehow, the TBevel does not. so if you click something on a TBevel, it will trigger a click to the component on it. I really just want to draw the four sides of this rectangle on a UniContainerPanel Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 6, 2020 Share Posted May 6, 2020 9 minutes ago, dkeene said: no need for fancy borders. However, a panel would hide the elements beneath it. somehow, the TBevel does not. so if you click something on a TBevel, it will trigger a click to the component on it. I really just want to draw the four sides of this rectangle on a UniContainerPanel UniContainerPanel -> function afterrender(sender, eOpts) { var me=sender; me.setStyle('border-right', '2px solid beige'); } Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 6, 2020 Share Posted May 6, 2020 function afterrender(sender, eOpts) { var me=sender; me.setStyle('border-top', '1px solid gray'); me.setStyle('border-left', '1px solid gray'); me.setStyle('border-bottom', '1px solid beige'); me.setStyle('border-right', '1px solid beige'); } 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.