Recent

Author Topic: Why will the IDE not allow changes to some Component Properties  (Read 2955 times)

DenPit5

  • New Member
  • *
  • Posts: 21
Why will the IDE not allow changes to some Component Properties
« on: December 15, 2018, 04:56:52 pm »
My Question is in the Subject to this post.   I find that some components have a little blue arrow in the Left margin and if that is present one cannot make changes.   For instance I wanted to change the size of a Label, it was not allowed.  Anyone know the reason and is there a way around this.

HeavyUser

  • Sr. Member
  • ****
  • Posts: 397
Re: Why will the IDE not allow changes to some Component Properties
« Reply #1 on: December 15, 2018, 05:04:35 pm »
My Question is in the Subject to this post.   I find that some components have a little blue arrow in the Left margin and if that is present one cannot make changes.   For instance I wanted to change the size of a Label, it was not allowed.  Anyone know the reason and is there a way around this.
set autosize to false.

jamie

  • Hero Member
  • *****
  • Posts: 6130
Re: Why will the IDE not allow changes to some Component Properties
« Reply #2 on: December 15, 2018, 05:47:27 pm »
maybe a helpful Hint message should popup over that arrow indicating what is currently going on and a solution ?

just saying  ;D
The only true wisdom is knowing you know nothing

HeavyUser

  • Sr. Member
  • ****
  • Posts: 397
Re: Why will the IDE not allow changes to some Component Properties
« Reply #3 on: December 15, 2018, 06:33:10 pm »
maybe a helpful Hint message should popup over that arrow indicating what is currently going on and a solution ?

just saying  ;D
No. use your brain. lazarus 1.8.4 has no blue icon shown. Personally I have never seen it and there is no documentation I know for it, so unless its a new feature on lazarus 2 with out documentation (yet?) its an arbitrary conclusion that the blue icon is any kind of indicator.

wp

  • Hero Member
  • *****
  • Posts: 11916
Re: Why will the IDE not allow changes to some Component Properties
« Reply #4 on: December 15, 2018, 06:47:35 pm »
I find that some components have a little blue arrow in the Left margin and if that is present one cannot make changes.
Can you post a screenshot? I do know a blue arrow in the gutter of the object inspector but it just highlights the property which is currently selected.

Blaazen

  • Hero Member
  • *****
  • Posts: 3237
  • POKE 54296,15
    • Eye-Candy Controls
Re: Why will the IDE not allow changes to some Component Properties
« Reply #5 on: December 15, 2018, 06:53:45 pm »
Little blue arrow is currently selected property. Little black arrows ⯈ indicate expandable properties (subclasses or sets).
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/

wp

  • Hero Member
  • *****
  • Posts: 11916
Re: Why will the IDE not allow changes to some Component Properties
« Reply #6 on: December 15, 2018, 06:55:40 pm »
I wanted to change the size of a Label, it was not allowed.
I'd guess with 95% probability that HeavyUser is right, AutoSize of the Label is active by default, and this means that its size is given by the size of the label text. Set AutoSize to false to change its size by yourself. But be aware that while the size may be correct on your system it may be not on the systems of your users due to different fonts in different themes or different OSs. AutoSize=true takes care of this.

The remaining 5% could be due to anchoring. If you used tha AnchorEditor to anchor controls to each other then you can come to a situation where you cannot change the layout with the mouse or with the standard Left/Top/Width/Height properties any more.

Handoko

  • Hero Member
  • *****
  • Posts: 5153
  • My goal: build my own game engine using Lazarus
Re: Why will the IDE not allow changes to some Component Properties
« Reply #7 on: December 15, 2018, 07:04:32 pm »
I find that some components have a little blue arrow in the Left margin and if that is present one cannot make changes.

All properties in the Object Inspector will show a blue arrow icon in the left margin if we click on the properly, except the selection item is an expandable property. Or maybe the OP meant different icon that I never know.

jamie

  • Hero Member
  • *****
  • Posts: 6130
Re: Why will the IDE not allow changes to some Component Properties
« Reply #8 on: December 15, 2018, 07:08:51 pm »
and my comment still stands, as you hover over the property a HINT message should flag the user that it is being
controlled elsewhere and a solution to it..

 Yes I do use my brain once in a while @HeavyUser
 
 Items that get locked out due to other settings within the Object inspector should have a little helper notice.

But don't let me stand in the way of progress.

The only true wisdom is knowing you know nothing

DenPit5

  • New Member
  • *
  • Posts: 21
Re: Why will the IDE not allow changes to some Component Properties
« Reply #9 on: December 16, 2018, 04:41:40 pm »
Many thanks to all who have taken the trouble to provide a possible answer to my question. Both WP and HeavyUser had the solution  and when I tried their suggestion about Autosize , lo & behold verything fell into place.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9867
  • Debugger - SynEdit - and more
    • wiki
Re: Why will the IDE not allow changes to some Component Properties
« Reply #10 on: December 16, 2018, 04:55:24 pm »
and my comment still stands, as you hover over the property a HINT message should flag the user that it is being
controlled elsewhere and a solution to it..

 Yes I do use my brain once in a while @HeavyUser
 
 Items that get locked out due to other settings within the Object inspector should have a little helper notice.

But don't let me stand in the way of progress.

The same happens if you try to change the size in code...

The component itself (could be TLabel, or TSomeThirdPartyComponent) does not tell the IDE why it does not accept the new value. The Component will just ignore the new value. (some 3rd party may throw exceptions, or whatever else...)

Anyway, such a feature (OI, hint/feedback/...) is still do-able. It needs a generic way to store the additional info in a way design time code can access it.
I think a patch implementing such a generic way in a pre-discussed / bespoken manner, and then a patch which adds such info in the generic way for existing components - those would be welcome.

 

TinyPortal © 2005-2018