Recent

Author Topic: design a custom tpanel in IDE  (Read 1400 times)

teriyaki

  • New Member
  • *
  • Posts: 26
design a custom tpanel in IDE
« on: October 15, 2021, 12:31:59 pm »
I hope to design a custom TPanel in IDE.

Is it possible to set the layout the components on the TCustomPanel just like what I did on TForm.
I will add the TCustomPanel instance with all components on it to a new Form later.

on macOS, I can design a NSView(TPanel) same as NSWindow(Tform) in Interface Builder

I am not sure if I can do it in Lazarus IDE?

Your comment welcome
« Last Edit: October 15, 2021, 12:35:34 pm by teriyaki »

jamie

  • Hero Member
  • *****
  • Posts: 5018
Re: design a custom tpanel in IDE
« Reply #1 on: October 15, 2021, 12:47:26 pm »
Maybe  you are looking to use TFRAME, that allows  you to build a layout that you can drop in at any time from the IDE within your project.

 It is basically done the same way you build a form and what it does is drops a scrolling window on your form when you get ready to use t along with all it's controls you made a head of time.

 The Scroll window does not appear visually on your form but is present so you can treat it much like a panel etc.
The only true wisdom is knowing you know nothing

teriyaki

  • New Member
  • *
  • Posts: 26
Re: design a custom tpanel in IDE
« Reply #2 on: October 15, 2021, 01:46:57 pm »
thanks for reply.

The reason I hope to design the custom panel on IDE, I do not like to use code to design the panel.

the custom panel will put into a TTableSheet of TPageControl.



the amount of TTableSheet is changeable.
Each  TTableSheet will have  a TCustomPanel.
« Last Edit: October 15, 2021, 02:13:42 pm by teriyaki »

jamie

  • Hero Member
  • *****
  • Posts: 5018
Re: design a custom tpanel in IDE
« Reply #3 on: October 15, 2021, 03:36:05 pm »
by your description I believe the TFRAME may work for you.

You can build it using the IDE and then apply it anytime onto a form or some other type of window control like another TPanel or something like that.

 You will also be able to use this same TFRAME in other apps, it would be like a canned lib for yourself.
The only true wisdom is knowing you know nothing

 

TinyPortal © 2005-2018