Einzelnen Beitrag anzeigen

Kas Ob.

Registriert seit: 3. Sep 2023
353 Beiträge
 
#4

AW: Design mit (fast) gleichen Tabsheets vereinfachen

  Alt 25. Okt 2023, 18:17
Hi,

I did the following many times:
1) You need two frames, one have everything except the difference which in this case your ListView, the other frame will have all your ListViews, these ListViews should not have alClient and it doesn't matter how they are positioned on that frame, TTabTampleteFrame and TListViewsFrame.
2) Don't inherit the frame TTabTampleteFrame, just register its class and create it at runtime, so you don't need to waste time with naming.
3) The frame with ListViews (TListViewsFrame) can be created any time you want, you need one copy of it, and you will change the parent for each ListView to its according TabSheet/Frame, and set the alignment, position, etc..
4) It is easier and more usable to have variables declared as the first frame TTabTampleteFrame or the tab inside it if you want, then just put with only ":=" the created frame to it (or tabsheet or even the listview.. it depends on your code and what you need), and continue to use it as you have them designed separately.
5) The point of variables is to remove the need to use any indexing, so double think what are you will need to access in them in specific as variables will give you that, other controls in the template frame will be a little harder to access.

Hope that help, and hope it was clear.
Kas
  Mit Zitat antworten Zitat