Jump to content


Photo

NxButton6 disabled look


  • Please log in to reply
1 reply to this topic

#1 bertrod

bertrod
  • Members
  • 93 posts
  • Gender:Male
  • Location:Switzerland

Posted 13 September 2019 - 11:51 AM

Hi,

 

In version 6.3.2 I noticed that when using a TNxButton6 with Style=stNative, when the button is Enabled=false it is not grayed.

For instance I'm using TNxButton6 with only an image (without text), and it is not possible to see visually when the button is enabled or disabled.

 

On my side, I could solve the problem this way:

 

- In NxCollection.pas : TNxButton6.Paint, under the line "if Focused...", I added the following line :

if not Enabled then Include(FState, bsDisabled) else Exclude(FState, bsDisabled);

- In NxStyles6.pas: TNxButtonStyle6.Paint, I changed the following line:

 

Previous version:

if bsDisabled in State then Index := tcToolbarButtonDown;

Corrected version:

if bsDisabled in State then Index := tcToolbarButtonDisabled;

(Note that this line appears 2 times in the function, but only the 2nd one is wrong).

 

I don't know if it was a bug, but the TNxButton6 now looks like the other buttons when disabled.

 

Hope it helps.



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,835 posts
  • Gender:Male

Posted 16 September 2019 - 09:09 PM

Thanks,

 

I will apply your fix into the code.


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users