Recent

Author Topic: [Solved!!!] Getting basic state-dependent properties for a component  (Read 1882 times)

kupferstecher

  • Sr. Member
  • ****
  • Posts: 446
Re: Getting basic state-dependent properties for a component
« Reply #15 on: April 21, 2021, 12:08:56 pm »
moreover, after some testing (Linux x86_64) I've discovered that whatever style you use you can always type something in the "edit" section, so the behaviour seems to be either widgetset-dependant or "buggy".

Just testet with Laz 2.0.10 on LinuxMint 19.2 Cinnamon 64bit, works as expected there.

heebiejeebies

  • Jr. Member
  • **
  • Posts: 59
Re: Getting basic state-dependent properties for a component
« Reply #16 on: April 21, 2021, 03:08:22 pm »
Thanks everyone for the suggestions!  I already had the workaround which was showing the PopupMenu when clicking a button, but to me (At least for my purposes) it looks clunky and non-standard.  Lucamar nailed it - I need a TCombobox with style set to csDropdownlist.  That works perfectly for me - I can't edit it at all?  Hope it is the same for my users.   %)  I'll try it anyway and see how it goes.  Thanks everyone!
Ubuntu 18.04/Lazarus 2.0.10 FPC 3.2.0

lucamar

  • Hero Member
  • *****
  • Posts: 4135
Re: Getting basic state-dependent properties for a component
« Reply #17 on: April 21, 2021, 05:35:47 pm »
Just testet with Laz 2.0.10 on LinuxMint 19.2 Cinnamon 64bit, works as expected there.

You're right. I re-tested and it works as it should. I must heve done something wrong the first time ... like forgetting to set the correct Style :-[

Hope it is the same for my users.

It should; to pay for my carelessnes I tested both Windows (32 bit) and Linux (32/64 bits) and it worked correctly everywhere. Sorry about the previous "noise" :-[ :-[
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

heebiejeebies

  • Jr. Member
  • **
  • Posts: 59
Re: Getting basic state-dependent properties for a component
« Reply #18 on: April 22, 2021, 06:19:37 am »
No problems at all, thanks heaps for finding the right component - I'd never have found it!  :D
Ubuntu 18.04/Lazarus 2.0.10 FPC 3.2.0

heebiejeebies

  • Jr. Member
  • **
  • Posts: 59
Re: Getting basic state-dependent properties for a component
« Reply #19 on: April 22, 2021, 10:14:31 am »
Btw just for any future Googlers, in answer to the initial question, it seems that, yes, typing the component name followed by a dot in the script editor does bring up all the relevant properties and procedures that can be applied to that component.  In this case, the original property that I was looking for was simply the Caption.  With a TComboBox, whatever the user selects becomes the caption. Easy  :D
Ubuntu 18.04/Lazarus 2.0.10 FPC 3.2.0

lucamar

  • Hero Member
  • *****
  • Posts: 4135
Re: Getting basic state-dependent properties for a component
« Reply #20 on: April 22, 2021, 11:21:36 am »
In this case, the original property that I was looking for was simply the Caption.  With a TComboBox, whatever the user selects becomes the caption. Easy  :D

Rather than Caption, for a combo box I'd recommend you read the Text property. Though both will, probably, return the same.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

 

TinyPortal © 2005-2018