Recent

Author Topic: GUI Design beginner question  (Read 10239 times)

AllRound

  • Newbie
  • Posts: 4
GUI Design beginner question
« on: July 09, 2005, 10:38:50 am »
I'm beginning my first project in lazarus and I was wondering what is the best way to handle GUI Design. What I mean is the following:

I want an application window with a menu on the left side and content on the right side. The menus can be buttons or whatever. Can I somehow include a form within the right side of the main form to change the content while the menu remains unchanged on the left side?

Or do I have to recreate the menu in every different content window I make?

eric

  • Sr. Member
  • ****
  • Posts: 267
GUI Design beginner question
« Reply #1 on: July 09, 2005, 08:29:33 pm »
It depends on what the 'content' is. If it's just text, then you can simply put a TMemo on the right hand side, and clear that and rewrite it each time you need to display different text.
But if you're talking about a more complex display which has several different layouts, then one way would be to be to put several TPanels on top of one another at the right hand side and set up each one to have the layout you want for one of the menu items. Then you could use Panelx.BringToFront to display the appropriate panel.

Eric

Anonymous

  • Guest
GUI Design beginner question
« Reply #2 on: July 18, 2005, 04:16:16 pm »
Wouldn't that slow the application alot if you have alot of TPanels?

RudieD

  • Full Member
  • ***
  • Posts: 234
GUI Design beginner question
« Reply #3 on: July 18, 2005, 07:47:36 pm »
Unfortunately the "Docking" caps. have not been implemented in FreePascal YET ! I myself need that for my designs, but unfortunately I don't have the knowledge to implement it.
The FRED Trainer. (Training FRED with Lazarus/FPC)

matthijs

  • Hero Member
  • *****
  • Posts: 537
GUI Design beginner question
« Reply #4 on: July 19, 2005, 10:37:34 am »
You don't need docking capabilities. You could use a TPageControl and let the choosen menu determine what is the active page. If you set the TabVisible property of the TabSheets to false this works perfectly without the user seeing you are using a PageControl.
It also makes it impossible for the user to switch to another TabSheet in any other way then by choosing something form the menu.
What's in a sig? Would my posting look less if it didnot have a sig? (Free after William S.) :)

:( Why cannot I upload my own Avatar? :(

glober

  • Full Member
  • ***
  • Posts: 130
GUI Design beginner question
« Reply #5 on: July 19, 2005, 07:13:30 pm »
Quote from: "matthijs"
You don't need docking capabilities. You could use a TPageControl and let the choosen menu determine what is the active page. If you set the TabVisible property of the TabSheets to false this works perfectly without the user seeing you are using a PageControl.
It also makes it impossible for the user to switch to another TabSheet in any other way then by choosing something form the menu.


There is a bug in TPageControl (bug# 0885), which is that if you set TabVisible to false, it completely disables/removes the page, not just make the tab invisible. If you don't want to see tabs you have to use  TPageControl.ShowTabs:=false , that will remove all the tabs thou.

matthijs

  • Hero Member
  • *****
  • Posts: 537
GUI Design beginner question
« Reply #6 on: July 19, 2005, 09:36:14 pm »
Quote from: "glober"
If you don't want to see tabs you have to use  TPageControl.ShowTabs:=false , that will remove all the tabs thou.

I wrote that post at work and I don't have lazarus installed there, only delphi. :) So I could not test it in Lazarus
What's in a sig? Would my posting look less if it didnot have a sig? (Free after William S.) :)

:( Why cannot I upload my own Avatar? :(

 

TinyPortal © 2005-2018