Recent

Author Topic: A feature for Lazarus?  (Read 8278 times)

Avishai

  • Hero Member
  • *****
  • Posts: 1021
A feature for Lazarus?
« on: May 22, 2013, 10:51:38 am »
I got to play with Visual Studio today just to compare it with Lazarus.  I noticed one thing that I thought would be a great feature for Lazarus.  When you select an item in the property editor, it displays an explanation at the bottom of the property editor.  Since I am not familiar with VS, it was very helpful for me.
Lazarus Trunk / fpc 2.6.2 / Win32

Leledumbo

  • Hero Member
  • *****
  • Posts: 8108
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: A feature for Lazarus?
« Reply #1 on: May 22, 2013, 11:32:20 am »
Already implemented, Options->Environment->Object Inspector->Show information box at the bottom (or something like that, I don't remember the entire line).

Avishai

  • Hero Member
  • *****
  • Posts: 1021
Re: A feature for Lazarus?
« Reply #2 on: May 22, 2013, 11:46:44 am »
As usual you are right :)  But it doesn't look like it has been fully implemented yet.  No matter what property I select the window shows "Package LCLBase".  But I can see that the idea is already in place.  It will just take someone to flush it out and fill in the missing pieces.  When it's fully functional I think it will be a great help.
Lazarus Trunk / fpc 2.6.2 / Win32

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 5635
    • wiki
Re: A feature for Lazarus?
« Reply #3 on: May 22, 2013, 12:13:49 pm »
Maybe you need to scroll, or enlarge it? (Tested with TButton)

But feel free to submit patches, Open the class in the sourceEditor (e.g. units Forms, TFOrm and base classes) then use the fpdoc editor.
The result is in the xml files somewhere in the dcos folder
« Last Edit: May 22, 2013, 12:15:38 pm by Martin_fr »

Avishai

  • Hero Member
  • *****
  • Posts: 1021
Re: A feature for Lazarus?
« Reply #4 on: May 22, 2013, 12:36:44 pm »
OK.  My bad  :-[  It works just fine.  I just needed to enlarge it.   But maybe others will read the post and find something new, like I did. 

I do have a question though.  Since "Package LCLBase" is (almost) always the first line, why is it there at all?  Also the "Description" line seems unnecessary.  In my opinion, it ends up taking up too much vertical real estate.  Still, it should be very useful for people that aren't already familiar with Lazarus.

The bottom line - It's a good idea and I didn't know it was there.
Lazarus Trunk / fpc 2.6.2 / Win32

Blaazen

  • Hero Member
  • *****
  • Posts: 2782
  • POKE 54296,15
    • Eye-Candy Controls
Re: A feature for Lazarus?
« Reply #5 on: May 22, 2013, 01:00:02 pm »
Nice, I didn't know this option. IMO, this should be active by default (for new users), experienced users know how to disable it.
Maybe the full text can be displayed as a Hint on mouse hovering. Hints are more compact - just like when you hover some unit (Graphics) in source editor, and it's more comfortable than scrolling.  Also, statusbar of OI seems be unused (AFAIR I never saw any text there).
Lazarus 2.1.0 r59757M FPC 3.3.1 r40507 x86_64-linux-qt Chakra, Qt 4.8.7/5.11.2, Plasma 5.14.2
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/

Avishai

  • Hero Member
  • *****
  • Posts: 1021
Re: A feature for Lazarus?
« Reply #6 on: May 22, 2013, 01:09:54 pm »
Thanks Blaazen.  I feel better now that I know I'm not the only one that didn't it was there.  And I agree that it could be a bit more compact.  Still, It's nice work.
Lazarus Trunk / fpc 2.6.2 / Win32

poiuyt555

  • Jr. Member
  • **
  • Posts: 91
Re: A feature for Lazarus?
« Reply #7 on: May 22, 2013, 02:56:44 pm »
Also i think, it will be interesting if properties, like:
Top, Left, Width, Heigth was somewhere near from each other.
Or like it screenshot grouped by +. maybe by some setting.

And about this feature (explanation of properties) - for me, as the Lasarus new user, it will be useful, i don't know about this.
And if not this topic i will not know about it. And maybe there is sense to do it as default.
« Last Edit: May 22, 2013, 03:03:07 pm by poiuyt555 »

Blaazen

  • Hero Member
  • *****
  • Posts: 2782
  • POKE 54296,15
    • Eye-Candy Controls
Re: A feature for Lazarus?
« Reply #8 on: May 22, 2013, 03:31:19 pm »
Quote
Top, Left, Width, Heigth was somewhere near from each other.
Qt Designer has it. See screenshot. But how can OI sort properties to categories? Where this info should be stored?
Lazarus 2.1.0 r59757M FPC 3.3.1 r40507 x86_64-linux-qt Chakra, Qt 4.8.7/5.11.2, Plasma 5.14.2
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/

Avishai

  • Hero Member
  • *****
  • Posts: 1021
Re: A feature for Lazarus?
« Reply #9 on: May 22, 2013, 03:52:21 pm »
Well, it looks I started something without intending to.  :-[  But while we are talking about property editors, I saw in Delphi XE3 that they now have a checkbox for boolean values in the property editor.  Checked = True and unchecked = False.  I think I would like that.  They also have some grouping like in Blaazen's image.
Lazarus Trunk / fpc 2.6.2 / Win32

Blaazen

  • Hero Member
  • *****
  • Posts: 2782
  • POKE 54296,15
    • Eye-Candy Controls
Re: A feature for Lazarus?
« Reply #10 on: May 22, 2013, 04:23:27 pm »
Quote
But while we are talking about property editors, I saw in Delphi XE3 that they now have a checkbox for boolean values in the property editor.
We have them too. See screenshot. But they are not default. If you want them, got to Tools - > Configure Build Lazarus ... Click button "Edit Defines", add there line "UseOICheckBox". There will appear a checkbox. Check it and rebuild Lazarus.

You can see that it is under development, the design is not consistent yet.
Lazarus 2.1.0 r59757M FPC 3.3.1 r40507 x86_64-linux-qt Chakra, Qt 4.8.7/5.11.2, Plasma 5.14.2
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/

Avishai

  • Hero Member
  • *****
  • Posts: 1021
Re: A feature for Lazarus?
« Reply #11 on: May 22, 2013, 04:29:38 pm »
Very cool Blaazen  :D  I know absolutely that I would never find that without someone telling me about it.  Thanks!  I wonder just how many other treasures Lazarus has hidden up it's sleeve.
Lazarus Trunk / fpc 2.6.2 / Win32

Avishai

  • Hero Member
  • *****
  • Posts: 1021
Re: A feature for Lazarus?
« Reply #12 on: May 22, 2013, 04:48:40 pm »
I think I'm going to have to wait a while for the Boolean CheckBoxes.  I get the CheckBoxes but it messes up the other properties.  The edit field is squeezed horizontally up to a very small box.  As you said, it's under development.
Lazarus Trunk / fpc 2.6.2 / Win32

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3634
  • I like bugs.
Re: A feature for Lazarus?
« Reply #13 on: May 22, 2013, 07:15:33 pm »
Quote
I get the CheckBoxes but it messes up the other properties. The edit field is squeezed horizontally up to a very small box.

You can use "svn blame" or "git blame" to find out who made it. :)
The feature is on hold partly because of a serious redraw problem with the CheckBox on Windows.

22347: Object Inspector has redraw problems on Windows
 http://bugs.freepascal.org/view.php?id=22347

Squeezing edit fields is done in code for testing purposes.
The remedy for the problem is known: the background must be painted, too, when using a CheckBox.

I improved the OI hint bottom pane. Now it shows by default. "Package LCLBase" is at the bottom. Description title is gone.
Please test.
The fact is that I have never studied the CodeHelp unit before. I had to learn the code just like anybody else would.

You guys are enthusiastic about the IDE features. You test every undocumented DEFINE etc.
Next time when you get a good idea for an improvement, you can as well dive into the code and provide a patch.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3634
  • I like bugs.
Re: A feature for Lazarus?
« Reply #14 on: May 22, 2013, 07:58:54 pm »
Quote
Top, Left, Width, Heigth was somewhere near from each other.
Qt Designer has it. See screenshot. But how can OI sort properties to categories? Where this info should be stored?

There is no category or group system in OI currently. IIRC Delphi has the category view but it is not useful because all properties go under some category. I think nobody is using it.
If somebody creates a useful category system, I believe it will be applied. The info could be stored in a hard-coded registration in a similar way that property editors are registered for properties. See RegisterPropertyEditor(). Look at units ObjectInspector and PropEdits. You must understand quite much code before you can safely implement it.
It is not a trivial task but is surely possible. I recommend using Git's local branch during the development as it may take some time.