Recent

Author Topic: LAMW - Getting text in jComboExit  (Read 1188 times)

maurobio

  • Hero Member
  • *****
  • Posts: 616
  • Ecology is everything.
    • GitHub
LAMW - Getting text in jComboExit
« on: September 22, 2023, 01:15:22 pm »
Dear ALL,

Is there a way of getting the text string just entered into a jComboEditText?

Thanks in advance!

Best regards,

UCSD Pascal / Burroughs 6700 / Master Control Program
Delphi 7.0 Personal Edition
Lazarus 2.0.12 - FPC 3.2.0 on GNU/Linux Mint 19.1, Lubuntu 18.04, Windows XP SP3, Windows 7 Professional, Windows 10 Home

Mongkey

  • Sr. Member
  • ****
  • Posts: 401
Re: LAMW - Getting text in jComboExit
« Reply #1 on: September 22, 2023, 01:54:13 pm »
May be this thread could help

https://forum.lazarus.freepascal.org/index.php?topic=21951.0

Only need to change the control.

maurobio

  • Hero Member
  • *****
  • Posts: 616
  • Ecology is everything.
    • GitHub
Re: LAMW - Getting text in jComboExit
« Reply #2 on: September 22, 2023, 01:59:24 pm »
Hi, @Mongkey!

Thanks, but that was not helpful. It does not even has to do with LAMW.

What I want is quite simple - just a way (if there is one) of getting the text string input in a jComboEdit text.

The regular LCL TComboBox has a Text property which is very useful but unfortunately is not available in the LAWM jComboEdit.

Best regards,
UCSD Pascal / Burroughs 6700 / Master Control Program
Delphi 7.0 Personal Edition
Lazarus 2.0.12 - FPC 3.2.0 on GNU/Linux Mint 19.1, Lubuntu 18.04, Windows XP SP3, Windows 7 Professional, Windows 10 Home

Mongkey

  • Sr. Member
  • ****
  • Posts: 401
Re: LAMW - Getting text in jComboExit
« Reply #3 on: September 22, 2023, 02:13:10 pm »
You could consider using jtextview change/enter/etc you could fire timer for procedure or direct code execution inside.

Thank you

maurobio

  • Hero Member
  • *****
  • Posts: 616
  • Ecology is everything.
    • GitHub
Re: LAMW - Getting text in jComboExit
« Reply #4 on: September 22, 2023, 02:17:51 pm »
Hi,, @Mongkey!

A jTextView is what I already use. But I want to use a jComboEdit!

This seems to be yet another of those many features (of lack of!) in which LAWM is just 90% functional and useful...

With best regards.
UCSD Pascal / Burroughs 6700 / Master Control Program
Delphi 7.0 Personal Edition
Lazarus 2.0.12 - FPC 3.2.0 on GNU/Linux Mint 19.1, Lubuntu 18.04, Windows XP SP3, Windows 7 Professional, Windows 10 Home

Mongkey

  • Sr. Member
  • ****
  • Posts: 401
Re: LAMW - Getting text in jComboExit
« Reply #5 on: September 22, 2023, 02:43:57 pm »
Quote
The regular LCL TComboBox has a Text property which is very useful but unfortunately is not available in the LAWM jComboEdit

I saw gettext and on enter on jcomboboxedit  :), if you cannot accomplish your desired component you could try mimic those component using simple almost similar component also.

Satisfying everyone needs seems to be imposible i think  :D

Thank you

maurobio

  • Hero Member
  • *****
  • Posts: 616
  • Ecology is everything.
    • GitHub
Re: LAMW - Getting text in jComboExit
« Reply #6 on: September 22, 2023, 02:54:03 pm »
Hi, @Mongkey!

Quote
Satisfying everyone needs seems to be imposible i think

But it would be definitely better for everyone if LAMW could mimic as closely as possible the LCL controls (and their methods and properties).

With best regards,
UCSD Pascal / Burroughs 6700 / Master Control Program
Delphi 7.0 Personal Edition
Lazarus 2.0.12 - FPC 3.2.0 on GNU/Linux Mint 19.1, Lubuntu 18.04, Windows XP SP3, Windows 7 Professional, Windows 10 Home

Mongkey

  • Sr. Member
  • ****
  • Posts: 401
Re: LAMW - Getting text in jComboExit
« Reply #7 on: September 22, 2023, 03:09:17 pm »
LAMW only has <5 active maintaner, it is a big framework for free, we have another job to feed our families  :), from that point of view, we could conclude how LAMW seems to be on very slow development for many peoples, but for me LAMW has great improvement from time to time  8-)

Thank you

maurobio

  • Hero Member
  • *****
  • Posts: 616
  • Ecology is everything.
    • GitHub
Re: LAMW - Getting text in jComboExit
« Reply #8 on: September 22, 2023, 08:32:08 pm »
Hi, @Mongkey!

I am not denying the great achievements of LAMW (otherwise I would not be using it myself).

But minor improvements can be much more efficient then larger ones, if well-planned and carefully targeted.

This would makes things better for everyone, no matter how many developers are there in the LAMW project.

Best regards,
UCSD Pascal / Burroughs 6700 / Master Control Program
Delphi 7.0 Personal Edition
Lazarus 2.0.12 - FPC 3.2.0 on GNU/Linux Mint 19.1, Lubuntu 18.04, Windows XP SP3, Windows 7 Professional, Windows 10 Home

c4p

  • Full Member
  • ***
  • Posts: 138
Re: LAMW - Getting text in jComboExit
« Reply #9 on: September 22, 2023, 10:19:52 pm »
Apologies in advance if I am picking this up wrong.
You want to get the text that is entered/typed into a jComboEditText?

This works for me:

First type in text into jComboEditText say 'qwerty'.

I have a jButton with this code in the OnClick event to add whatever text is entering into the jComboEditBox1 to the jComboEditBox1 list, of course you will need to save this list to a DB or CSV etc. and reload it back in on next startup, if that's what you want to do.

Code: Pascal  [Select][+][-]
  1. jComboEditText1.add(ComboEditText1.getText);

Or if you just want to display text on screen:
Code: Pascal  [Select][+][-]
  1. showmessage(jComboEditText1.getText);

Note: This will do the same thing as GetText.
Code: Pascal  [Select][+][-]
  1. jComboEditText1.Text




Lazarus 2.0.12 r64642/FPC 3.2.0 on Windows 10 22H2, projects mainly built using AppCompat and Gradle v6.6.1.

maurobio

  • Hero Member
  • *****
  • Posts: 616
  • Ecology is everything.
    • GitHub
Re: LAMW - Getting text in jComboExit
« Reply #10 on: September 23, 2023, 04:15:47 pm »
Hi, @c4p!

Quote
Apologies in advance if I am picking this up wrong.
You want to get the text that is entered/typed into a jComboEditText?

You are absolutely right, that is just what I want!

The GetText method should do the trick, but I could not find a 'Text' property in jComboEditText (at least in my version of LAMW).

Thank you very much!

With warmest regards,
UCSD Pascal / Burroughs 6700 / Master Control Program
Delphi 7.0 Personal Edition
Lazarus 2.0.12 - FPC 3.2.0 on GNU/Linux Mint 19.1, Lubuntu 18.04, Windows XP SP3, Windows 7 Professional, Windows 10 Home

 

TinyPortal © 2005-2018