Forum > Designer

How to display same LCL widget in different TabSheets

<< < (2/3) > >>

I didn't read your previous post. I posted my answer when I was busy watching the TV.  :P

Yes, the easiest is to put that 'thing' outside the page control.

I often doing something weird. Not satisfied with TFrame and not willing to use MDI, I wrote my custom form and put it on TabSheet on runtime. So I need to put some buttons for managing the 'forms', which they should be always shown on all tabs. It worked, although I don't think that is the best approach.


--- Quote from: Handoko on June 18, 2021, 06:10:24 pm ---I didn't read your previous post. I posted my answer when I was busy watching the TV.  :P

--- End quote ---


Reduce the size of the brower with theTV to a quarter.
Put it in the topright corner.
Tell it to stay on top.

That's the way I do it,



--- Quote from: wp on June 18, 2021, 04:58:36 pm ---I don't know what exactly you want to achieve.

--- End quote ---

I have a quite complex UI with many tabs. To spread the same info across different UI positions, i want to duplicate e.g. a lineEdit.

Attached is an example where i have a LineEdit it Tab 2. The LineEdit that it is Tab 1 should be an exact copy of the one in Tab 2 - same size, enable state, value, hint...
it is hereby important that the users doesn't need to change the tab. So the LineEdit in Tab 1 if changed for some reason, he sees it immediately in Tab 2.

At the moment I do it like in the attached example but I thought there is a more simpler solution.


--- Quote from: winni on June 18, 2021, 05:58:40 pm ---* He wants to draw infos depending on the Tabsheet but he does not want to waste a panel for each page.

--- End quote ---

No, I have several tabs which all look different. When the user is in Tab 7  he should see a change happening in Tab 3. But when he is in Tab 5, he should not see the info at all. Therefore I cannot place the LineEdit outside the PageControl. See the example in my last post.


--- Quote from: winni on June 18, 2021, 04:30:15 pm ---Use the onChange event of the PageControl to change the parent of the panel to the AktivePage:

--- End quote ---

That would be a nice idea, but unfortunately, the widgets are at different locations in the tabs. With your solution, the panel would appear at the same position in every tab.


[0] Message Index

[#] Next page

[*] Previous page

Go to full version