Recent

Author Topic: New form or panel etc.  (Read 2918 times)

Zath

  • Sr. Member
  • ****
  • Posts: 391
New form or panel etc.
« on: June 18, 2013, 12:21:36 am »
What's the best way to proceed ?
I currently have a single form with various edit components etc. to perform a task.
I have now added a menu option that will call a new form for a different task.
There will be multiple tasks to perform.
Should I call a new form every time or have a panel containing each set of components and call a new panel each time?
The forms will all be the same size and will reference the same directory for the files being accessed.

What is the preferred or correct design here ?

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: New form or panel etc.
« Reply #1 on: June 18, 2013, 12:35:30 am »
It's difficult to say (I can only guess what "task" and "different task" really is).
I think you can try TPageControl and its Tabs can be visible or invisible.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Zath

  • Sr. Member
  • ****
  • Posts: 391
Re: New form or panel etc.
« Reply #2 on: June 18, 2013, 12:45:25 am »
The tasks involve various filelists, memobox etc. to edit text files.

kpeters58

  • Sr. Member
  • ****
  • Posts: 267
Re: New form or panel etc.
« Reply #3 on: June 18, 2013, 09:27:50 pm »
I do not think that there's a definitive answer. All three ways that have been mentioned thus far will create the results you are after.

Personally, I would either go with the page control as it eases design work considerably or, if there is large amounts of task specific code, with separate forms which I would derive from a common ancestor form to easily share looks and common functionality.

I am sure others would come up with yet unnamed methods to do things like this.....
Lazarus 2.0.4/FPC 3.0.4/Win 64

Zath

  • Sr. Member
  • ****
  • Posts: 391
Re: New form or panel etc.
« Reply #4 on: June 18, 2013, 11:16:57 pm »
Ok, thanks for the ideas.

 

TinyPortal © 2005-2018