Recent

Author Topic: About those non-visual/non-placeable components...  (Read 5715 times)

edvard

  • Full Member
  • ***
  • Posts: 172
About those non-visual/non-placeable components...
« on: November 20, 2013, 07:42:01 am »
I'm sure this has been asked/suggested before, but I couldn't find it anywhere.

My suggestion is:
Along with the form design window, have a dedicated area to place non-visual and standard-placement components like popup menus and tray icons.  As it is now, I had just been placing these randomly on the form living with the annoyance until somebody in another IRC forum suggested I just pull them off-form to keep them from cluttering up the place. That worked out pretty fine, but I'd still like a visual reminder they are there (I know, I know, there they are in the object inspector...).  My reference is how Code::Blocks does it with wxSmith.  See here:

http://s24.postimg.org/6m5zt8rcl/codeblockswxsmithnonvisual.png

See how the main menu, statusbar and toolbar all go in a little panel thingummy?  Nice and tidy.
I understand that with the form designer being a floating window, this may be hard to implement, but I think it'd be a neat feature someday.
« Last Edit: November 20, 2013, 07:51:18 am by edvard »
All children left unattended will be given a mocha and a puppy.

Arch (though I may go back to Debian)| FreePascal 3.2.2 + Lazarus 2.2.4, GTK2+ and Qt.  Mostly Qt...

Avishai

  • Hero Member
  • *****
  • Posts: 1021
Re: About those non-visual/non-placeable components...
« Reply #1 on: November 20, 2013, 08:36:05 am »
You can put them in a DataModule.
Lazarus Trunk / fpc 2.6.2 / Win32

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11452
  • FPC developer.
Re: About those non-visual/non-placeable components...
« Reply #2 on: November 20, 2013, 09:50:47 am »
The Lazarus concepts of datamodules has the advantage that those (non visual) components can be used from multiple forms (visual designer).

How does Code::Blocks achieve that?

Avishai

  • Hero Member
  • *****
  • Posts: 1021
Re: About those non-visual/non-placeable components...
« Reply #3 on: November 20, 2013, 09:58:05 am »
Exactly marcov.  Usually 1 DataModule for an entire project and it's available to all Forms that need it.  Plus it doesn't clutter up the Forms while you are working on them, yet they are easy to get to.  On top of that, you can use them from one project to another (I don't recommend that usually although you can have 1 "standard" DM and add a project specific DM if needed).
Lazarus Trunk / fpc 2.6.2 / Win32

edvard

  • Full Member
  • ***
  • Posts: 172
Re: About those non-visual/non-placeable components...
« Reply #4 on: November 21, 2013, 04:54:51 am »
You can put them in a DataModule.

Wow, I had no idea.  Thanks for that.  :)

...

How does Code::Blocks achieve that?

I have no idea.  In my quest for a programming language/environment I can wrap my little head around, I fooled with C++ a bit on Code::Blocks and thought that how it (actually, the wxSmith plugin) dealt with those types of elements was rather tidy.
I do like the way Lazarus form designer will actually show the menu at the top of the form after dropping the menu component on.  Very nice.

Now to look up this 'DataModule' you speak of, and learn me a  few things...  :D
All children left unattended will be given a mocha and a puppy.

Arch (though I may go back to Debian)| FreePascal 3.2.2 + Lazarus 2.2.4, GTK2+ and Qt.  Mostly Qt...

edvard

  • Full Member
  • ***
  • Posts: 172
Re: About those non-visual/non-placeable components...
« Reply #5 on: November 24, 2013, 07:11:12 am »
Could either of you guys chime in here?:

http://forum.lazarus.freepascal.org/index.php/topic,22713.0.html

Thanks!
All children left unattended will be given a mocha and a puppy.

Arch (though I may go back to Debian)| FreePascal 3.2.2 + Lazarus 2.2.4, GTK2+ and Qt.  Mostly Qt...

 

TinyPortal © 2005-2018