panel outside form lazarus / 31-LCL ---------------------------------------------------------------------- mesiarm · 2013-09-07 21:09 Is there chance to have panel with other components outside the form, connected to form? I want to create something like sliding panel. ---------------------------------------------------------------------- taazz · 2013-09-07 21:24 No, all child controls are properly clipped inside the parents client area. If the sliding panel can be aligned on one of the form sides you can fake it by increasing/decreasing the forms width/height as the panels height/width is increased/decreased. If you want it to be like a drop popup menu instead of completely occupying aside of the form then you are out of lack you need change to a form instead and this will problematic at best. ---------------------------------------------------------------------- Avishai · 2013-09-07 23:50 I have not tried it but maybe you could use a TFrame and increase/decrease height or width. ---------------------------------------------------------------------- User137 · 2013-09-08 03:16 As taazz said, a form could act as a popup frame. More specifically a borderless TForm, maybe set with ShowOnTop. ---------------------------------------------------------------------- mesiarm · 2013-09-08 08:20 hmm i think about something like Powerdvd has for example here http://www.qweas.com/reviews/images2/cyberlink-powerdvd-scr.jpg But no so much complicated  Would it be possible in lazarus? I really don´t want complicated things. ---------------------------------------------------------------------- tfk · 2013-09-08 14:26 As mentioned earlier in this thread, using forms will be the best and most simple solution. De connection to other forms can be established by adding the unit of the other form in the form's uses statement. Best is to add an extra uses statement just under the implementation section to avoid circular references. I would do it like this: Create a second form and set it's visibility to false;Put a panel on top of it and set it's anchors to top, bottom and right. This will ensure that all elements will retain their position;Create an event handler for an onclick event of a button that will handle the show/hide action of the second form;In this handler you can set the properties of the form to whats needed to display it correctly. Best is to first pre-position the form when hidden, make it visible, and then set it's width to fold it out. You could even animate this last step to create a sliding motion. Doing things this way has another benefit. Because you're using the properties of the FCL components, you have a multi platform solution. TFK ---------------------------------------------------------------------- howardpc · 2013-09-08 23:25 Quote from: tfk on September 08, 2013, 04:26:25 pmI would do it like this: 1. Create a second form and set it's visibility to false 2. ... Toggling the visibility of a form is not always a good idea. It messes with form focus, and trying to set the properties of an invisible form also leads to unexpected anomalies. It is probably better to toggle the form's width between 0 and the desired value. See the attached proof-of-concept project. ---------------------------------------------------------------------- mesiarm · 2013-09-10 09:19 Thanks, i tried that, now I need to find something to join these two forms together ---------------------------------------------------------------------- Avishai · 2013-09-10 09:23 If you use TFrame you do not have this problem. ---------------------------------------------------------------------- x2nie · 2013-09-11 18:49 No, you might only need 1 form, and 1 panel... (sadly) in Delphi. In Delphi, there is 2 properties that can be played to solve this problem. Set TForm1.TransparentColor := True; and Tform1.TransparentColorValue := clOlive; //or any other TColor. and, set TForm1.Color := clOlive; //or other color that similar to TransparentColorValue property. it would make the client area (that color = clOlive) of Form1 to be transparent. ------------------------ I didnt know yet the similar way in Lazarus. If I am not wrong, it is under the topic of "Region" or "HRGN." Sorry, I didnt have yet better idea. ---------------------------------------------------------------------- idc65 · 2013-09-11 20:18 Hi, Not sure if this helps, but if I want a scrolling panel, I place the larger panel, within a smaller panel, and change it's left value to a negative one. Not even sure if it exactly what you were after. Attached a simple example with a large panel in a smaller panel, and a scollbar to move it around.