Recent

Author Topic: LAMW: jListView - HighLightSelectedItemColor  (Read 12712 times)

c4p

  • Full Member
  • ***
  • Posts: 157
LAMW: jListView - HighLightSelectedItemColor
« on: May 21, 2017, 01:07:54 pm »
I am currently using jListView to good effect (works well), however, the HighLightSelectedItemColor method does not seem to work? using LAMW v0.7.15 (can't see any changes that would affect this in the later release changelog to correct this). I have tried applying this to the OnClickItem event and others including via a button and oncreate form (Including setting jListView1.HighlightSelectedItem := true). Maybe I am doing something wrong?
I should also mention that OnLongClickItem also does not seem to function (I will probably use this later for adding scheduled notifications).

I have built a fully functional app using LAMW and very pleased with the results, just need to add some bells and whistles.
Many thanks in advance.
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #1 on: May 21, 2017, 08:23:49 pm »
Hello c4p!

I will try fix "HighLightSelectedItemColor"!

Thank you!

PS. but, please, updade your LAMW from github!
« Last Edit: May 21, 2017, 08:25:55 pm by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #2 on: May 21, 2017, 10:28:33 pm »

Try [a rapid fixed] to jListView "highLightSelectedItem" !

Please, updated from github ....  [the longClicked was fixed some time ago...]

Use: in design time set HighLightSelectedItem property
to some color <> default

NOTE:
1)handle form OnCreate event to initialize  just "core"  Pascal stuff.  ex: TStringList and more...
2)handle form "OnJNIPrompt" to  initialize android "jComponents" and other Android system stuff..

Thank you!
           
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

c4p

  • Full Member
  • ***
  • Posts: 157
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #3 on: May 22, 2017, 12:00:50 pm »
Excellent, I will update my install from github, many thanks!
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

c4p

  • Full Member
  • ***
  • Posts: 157
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #4 on: May 23, 2017, 08:07:42 pm »
With the updated packages I can open and create a new project and compiles/runs fine but existing project crashes on startup on the phone.
Would I have to remove all existing components and reapply the new ones? works fine with existing packages.  Using latest svn.
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #5 on: May 23, 2017, 09:59:25 pm »
Quote
..Would I have to remove all existing components and reapply the new ones?

No! Please, try menu  "Clean up and Build" ....... then "[lamw] Build Android Apk and Run"
 
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

c4p

  • Full Member
  • ***
  • Posts: 157
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #6 on: May 23, 2017, 11:35:00 pm »
Sorry, yes, tried that too, keep getting control error after clean/build.
I must be doing something wrong.
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #7 on: May 24, 2017, 06:58:21 am »
Well, after updated from github you need re-install all LAMW packages. Have you done that?


NOTE:

instalation order:

      tfpandroidbridge_pack.lpk   [..../android_bridges]
      lazandroidwizardpack.lpk   [..../android_wizard]
      amw_ide_tools.lpk      [..../ide_tools]





« Last Edit: May 24, 2017, 07:02:11 am by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

c4p

  • Full Member
  • ***
  • Posts: 157
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #8 on: May 24, 2017, 07:58:53 am »
Yes, all reinstalled in that order, going to do a fresh install this evening after work, I will let you know, thanks.
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

c4p

  • Full Member
  • ***
  • Posts: 157
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #9 on: May 29, 2017, 11:46:09 am »
Reinstall of Laz4Android solved the issue, however, I have a few issues with some components using svn (0.7 rev. 18 - 20 May 2017):

- HighlightSelectedItem does not work on jListView (tried OnJNIPrompt and others but has no effect) - even when set true and color set
- jListView item row spacing seems much larger and can't find a method to reduce this?
- lpWrapContent Text wrapping seems to be permanent on the jSpinner component, which is a pain, would prefer to truncate text in the box as messes up design layout. Setting to lpUseWeight results in a x/y anomaly.

LongClick works perfect on jListView - this will be very useful for me, thank you.

jmpessoa, I really appreciate your work on this.
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #10 on: May 29, 2017, 07:08:22 pm »

Hi c4p!

I just updated jListView!

[try in design time set HighlightSelectedItemColor <> colbrDefault]

So, please update it!

I will try fix yours issues!

Thank you!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

c4p

  • Full Member
  • ***
  • Posts: 157
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #11 on: May 29, 2017, 09:30:03 pm »
Ah!
It works, but I had to remove the old jListView component from the form and add a new one on, it must had artefacts from the old component?
HighLightSelectedItem works perfect now!  8-)
Thank you!
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #12 on: May 29, 2017, 09:51:44 pm »

Hi  c4p,

If you put the new stuff in LAMW folders, all files in your project will be updated after a re-build.
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

c4p

  • Full Member
  • ***
  • Posts: 157
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #13 on: May 29, 2017, 10:16:22 pm »
Yes, I reorganised my folders on reinstall, should be ok now, thanks.
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

c4p

  • Full Member
  • ***
  • Posts: 157
Re: LAMW: jListView - HighLightSelectedItemColor
« Reply #14 on: May 30, 2017, 12:43:13 am »
I think the issue with jListView item highlight is if you set the font color to anything other than colbrDefault it will not set the color by HighLightSelectedItemColor. Just discovered this by accident when I added the new jListView component and set the font color to white and then the highlight stopped working.
Sorry for giving you more work.  :(
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

 

TinyPortal © 2005-2018