Forum > Suggestions
Lazarus Suggestion: Form Designer Ideas (non visual components)
Tony Stone:
I have some forms with many non-visual components. Right now, I know we can toggle their visibility, but I haven't found a hotkey for this, or a way to set one up. If there's a hotkey I'm missing, I'd love to know how to do it.
Also, I've got a suggestion for handling these components better(I think). What about a sub menu in the forms context menu that displays a grid view of all non-visual components on the form? This way, we'd have all non-visual components neatly organized in one spot, making it quick to find and view what non visual components are on a form. There has been times I placed one and it ended up way off the visual area of the form as I must have placed it at some point before shrinking the form down. Now I also understand they are kind of all grouped together at the bottom of the object inspector list... but I feel like a quick view of what I have on the form using its components icon could be very handy.
This setup would mean:
All non-visual components are in one place - less clutter, more organization.
Easy editing and configuration - click an icon, and it's highlighted in the Object Inspector.
A clear visual of what's in use...
I really think this would be more of a logical setup, especially on forms with many non visual components. I am also curious if there is some other reason that I may be missing or ignorant to that would require a non visual components postion on a form to even be tracked? Or is it just simply because this is the way Delphi did it and other IDEs? It has always seemed so odd to me and actually annoys me often when all of the non visual icons clutter my form.
Since I don't think this is a feature the developers will implement my next ideal solution would be for there to be a hotkey to toggle the visibility of all components and it would be nice if it was persistent. When i reopen a Lazarus project where i had hidden the NVC's they end up showing up again.
TRon:
Hi Tony,
That is why you can use a Datamodule and while that wiki link states it is meant for database components that is not the case. You can use a datamodule to group any kind of non-visual components, methods, subroutines and whatever else you wish to group together.
Tony Stone:
You know now that you mention it this was actually suggested to me before but I have forgotten. But I do recall try again when it was suggested to me and I think I still felt it should be more streamlined but I will look into it again especially this was probably a year or more ago that someone on the forum suggested that to me. Thanks
VisualLab:
--- Quote from: TRon on December 29, 2023, 07:39:24 am ---Hi Tony,
That is why you can use a Datamodule and while that wiki link states it is meant for database components that is not the case. You can use a datamodule to group any kind of non-visual components, methods, subroutines and whatever else you wish to group together.
--- End quote ---
It is also worth taking a look at the documentation of the TDataModule class. It is only slightly more extensive than TComponent (mainly with features related to the design stage).
--- Quote from: Tony Stone on December 29, 2023, 01:37:03 pm ---You know now that you mention it this was actually suggested to me before but I have forgotten. But I do recall try again when it was suggested to me and I think I still felt it should be more streamlined but I will look into it again especially this was probably a year or more ago that someone on the forum suggested that to me. Thanks
--- End quote ---
Maybe you mean the approach used in Visual Studio? There, in the form editor, non-visual components are placed in a separate area below the form. Is this a better (more convenient) solution? Hard to say. If there are many non-visual components in the form at the design stage, this area will have to be scrolled using scroll bars anyway. Moreover, in the form editor in VS, each non-visual component takes up more space than those in Delphi/Lazarus.
Tony Stone:
--- Quote from: VisualLab on December 29, 2023, 02:03:07 pm ---
Maybe you mean the approach used in Visual Studio? There, in the form editor, non-visual components are placed in a separate area below the form. Is this a better (more convenient) solution? Hard to say. If there are many non-visual components in the form at the design stage, this area will have to be scrolled using scroll bars anyway. Moreover, in the form editor in VS, each non-visual component takes up more space than those in Delphi/Lazarus.
--- End quote ---
I am not sure how Visual Studio does it. But I just keep imagining a context menu that pops open a small 200 x 200ish gridview of the NVC's used. But I am gonna look at the data modules again when I get home. Maybe it is time for me to expand my knowledge into other features available to me such as the data modules. I think my feeling when I tried data modules is that i was adding things to my final executeable program that were uneccesary justto make design time more stream lined.
Navigation
[0] Message Index
[#] Next page