Recent

Author Topic: LAMW Disabled(grayed) JButton not work  (Read 5562 times)

freris

  • New Member
  • *
  • Posts: 48
  • A Retired hobbist programmer from Greece
LAMW Disabled(grayed) JButton not work
« on: April 28, 2017, 04:39:54 pm »
Hi !

I try to disable (gray out) a JButton on a simple Android application with 

Code: Pascal  [Select][+][-]
  1. JButton1.enabled:=False;
  But no luck.

I am using LAMW latest version.

I wonder, if someone has the same problem. Any help is appreciated.


Thanks

As I get older, the more I learn !!

Handoko

  • Hero Member
  • *****
  • Posts: 5122
  • My goal: build my own game engine using Lazarus
Re: LAMW Disabled(grayed) JButton not work
« Reply #1 on: April 28, 2017, 04:43:07 pm »
As far as I know, lots of properties in LAMW can't be change runtime. For example, the positions and the sizes of the component. I don't know why, perhaps they haven't implemented or maybe we should call a 'refresh' to update the screen.

jmpessoa

  • Hero Member
  • *****
  • Posts: 2296
Re: LAMW Disabled(grayed) JButton not work
« Reply #2 on: April 28, 2017, 06:05:41 pm »

Hello Freris!

I will fix it!

Thank you!

PS.
Now, you can try SetVisible(False) ...
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

freris

  • New Member
  • *
  • Posts: 48
  • A Retired hobbist programmer from Greece
Re: LAMW Disabled(grayed) JButton not work
« Reply #3 on: April 28, 2017, 06:46:05 pm »
Thanks jmpessoa !

Yes the property Visble is Ok, i know.

I will wait for the fix.


Thank you
As I get older, the more I learn !!

jmpessoa

  • Hero Member
  • *****
  • Posts: 2296
Re: LAMW Disabled(grayed) JButton not work
« Reply #4 on: April 30, 2017, 02:58:33 am »

Ok!

Fixed in "Version 0.7.16 - 29 - April - 2017"

Thank you!

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

freris

  • New Member
  • *
  • Posts: 48
  • A Retired hobbist programmer from Greece
Re: LAMW Disabled(grayed) JButton not work
« Reply #5 on: April 30, 2017, 09:56:45 am »
Hi jmpessoa !

Yes it fixed, but no grayed out.

And something else, jHttpClient component has no timeout property. I modify myself the code in ..\java\lamwdesigner\jHttpClient.java  all timeouts to meet my needs, but i think is useful to have timeout property.

Thank you
« Last Edit: April 30, 2017, 10:01:03 am by freris »
As I get older, the more I learn !!

jmpessoa

  • Hero Member
  • *****
  • Posts: 2296
Re: LAMW Disabled(grayed) JButton not work
« Reply #6 on: April 30, 2017, 05:40:52 pm »


Hello Freris!

In my galaxy s4 - Android 5.01 -  grayed out is Ok!
[I will try in others devices....]

Please, send me your patched "jHttpClient.java"   ...

Hint:  You can use the native Free Pascal  "FPHttpclient", too.

Just put this files in your project "jni" folder:
              fphttpclient.pp
              httpdefs.pp
              httpprotocol.pp

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

freris

  • New Member
  • *
  • Posts: 48
  • A Retired hobbist programmer from Greece
Re: LAMW Disabled(grayed) JButton not work
« Reply #7 on: April 30, 2017, 07:26:20 pm »
Hi jmpessoa !

Yes you are right. My fault, i have set custom font color.  When change to default - is ok.

In jHttpClient.java, only timeout i have change. Look At attachment zip.

If we can control all  timeouts from outside such as  "  SetConnetiontimeout" or "SetResponseTimeout", i suppose, that will be useful.


Thank you for your suggestion ( FPHttpClient ) .
As I get older, the more I learn !!

jmpessoa

  • Hero Member
  • *****
  • Posts: 2296
Re: LAMW Disabled(grayed) JButton not work
« Reply #8 on: April 30, 2017, 07:36:41 pm »

Ok. I will try your suggestion!

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

jmpessoa

  • Hero Member
  • *****
  • Posts: 2296
Re: LAMW Disabled(grayed) JButton not work
« Reply #9 on: May 04, 2017, 07:32:38 am »
Quote
If we can control all  timeouts from outside such as   SetConnetiontimeout" or "SetResponseTimeout", i suppose, that will be useful.

Done!

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

freris

  • New Member
  • *
  • Posts: 48
  • A Retired hobbist programmer from Greece
Re: LAMW Disabled(grayed) JButton not work
« Reply #10 on: May 05, 2017, 12:15:10 pm »
Hi jmpessoa,

Thanks but i have bad news...

When set timeouts and run app, then app crashes. (Both timeout or independent).

Can you see what happens ?

Thanks again
As I get older, the more I learn !!

jmpessoa

  • Hero Member
  • *****
  • Posts: 2296
Re: LAMW Disabled(grayed) JButton not work
« Reply #11 on: May 05, 2017, 09:06:52 pm »

Fixed!

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

freris

  • New Member
  • *
  • Posts: 48
  • A Retired hobbist programmer from Greece
Re: LAMW Disabled(grayed) JButton not work
« Reply #12 on: May 06, 2017, 03:46:40 pm »
Hi jmpessoa,

Yes !!  Fixed.   

Thank you very much.

Have a nice day.
As I get older, the more I learn !!

 

TinyPortal © 2005-2018