Recent

Author Topic: TColorButton  (Read 14755 times)

Eclipticon

  • Jr. Member
  • **
  • Posts: 51
TColorButton
« on: August 14, 2011, 11:31:50 pm »
Hi,

I got serveral TColorButton in a GroupBox ... they neither show up in the tab order nor do they disable as all other components do when MyGroupBox.Enabled is set to False.

Are these bugs or is this a misconception on my side?

Thanks :-)
« Last Edit: August 14, 2011, 11:42:19 pm by Eclipticon »
Lazarus 1.2.4 on Win XP/7 Virtual Machine

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: TColorButton
« Reply #1 on: August 15, 2011, 12:22:33 am »
Probably you didn't set their Parent to GroupBox. You can do it by right-click (on ColorButton) -> Change Parent > GroupBox
I just tested and it works as expected here, Linux+Qt4.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Eclipticon

  • Jr. Member
  • **
  • Posts: 51
Re: TColorButton
« Reply #2 on: August 15, 2011, 12:27:02 am »
The Parent of all ColorButtons is set, in the hierarchy of the Object Inspector they are also show as belonging to the GroupBox.

The problem was observed on WinXP 32bit with Lazarus 0.9.30 ... can anyone confirm?
Lazarus 1.2.4 on Win XP/7 Virtual Machine

Eclipticon

  • Jr. Member
  • **
  • Posts: 51
Re: TColorButton
« Reply #3 on: September 12, 2011, 07:58:36 pm »
Bump?
Lazarus 1.2.4 on Win XP/7 Virtual Machine

Arbee

  • Full Member
  • ***
  • Posts: 223
Re: TColorButton
« Reply #4 on: September 12, 2011, 09:06:11 pm »
Works as expected on a Mac.

You'll have to wait a couple of hours before I can try this on a Windows machine.
« Last Edit: September 13, 2011, 09:00:07 am by Arbee »
1.0/2.6.0  XP SP3 & OS X 10.6.8

Arbee

  • Full Member
  • ***
  • Posts: 223
Re: TColorButton
« Reply #5 on: September 13, 2011, 08:59:15 am »
Tested on Windows.  Works fine.
1.0/2.6.0  XP SP3 & OS X 10.6.8

Eclipticon

  • Jr. Member
  • **
  • Posts: 51
Re: TColorButton
« Reply #6 on: September 13, 2011, 09:05:20 am »
Tested on Windows.  Works fine.

So the TColorButtons receive the focus when you <Tab> through the components on your form?
Very interesting, especially as we use similar OS and Lazarus versions ...
Lazarus 1.2.4 on Win XP/7 Virtual Machine

Arbee

  • Full Member
  • ***
  • Posts: 223
Re: TColorButton
« Reply #7 on: September 13, 2011, 09:31:19 am »
Actuall I was referring to the enable/disable problem.  The TColorbutton does not have a Taborder property AFAIK, so you can't TAB through them.
1.0/2.6.0  XP SP3 & OS X 10.6.8

Eclipticon

  • Jr. Member
  • **
  • Posts: 51
Re: TColorButton
« Reply #8 on: September 13, 2011, 10:49:33 am »
Hi, thanks for clarifying that ... I will create at test project for the Enable problem.

Is there any reason why a TColorButton should not be available via Taborder?
Lazarus 1.2.4 on Win XP/7 Virtual Machine

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: TColorButton
« Reply #9 on: September 13, 2011, 12:00:47 pm »
Quote
Is there any reason why a TColorButton should not be available via Taborder?

Because TColorButton is derived from TCustomSpeedButton which is derived from TGraphicControl which AFAIK has no focus.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Eclipticon

  • Jr. Member
  • **
  • Posts: 51
Re: TColorButton
« Reply #10 on: September 13, 2011, 06:09:49 pm »
Blaazen, I agree with you on the technical reasons why TColorButton can not get the focus.

In terms of user experience I think it is a bit stupid to have something that looks like a button in the middle of a dialog but not reachable with the keyboard. However TColorButton seems to be made for use in toolbars, where this behaviour is more acceptable ...
Lazarus 1.2.4 on Win XP/7 Virtual Machine

Eclipticon

  • Jr. Member
  • **
  • Posts: 51
Re: TColorButton
« Reply #11 on: September 13, 2011, 08:18:09 pm »
This project shows the Enable/Disable problem:

1. While ColorButton1 does not work anymore when disabled via GroupBox1 in FormCreate, it does not *look* disabled.

2. It only changes visually to disabled when Button2 is pressed and ColorButton1 is disabled explicitly.

Can anyone confirm?
Lazarus 1.2.4 on Win XP/7 Virtual Machine

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: TColorButton
« Reply #12 on: September 13, 2011, 09:00:38 pm »
I can confirm here Linux+Qt.
Please, attach also "project11.lpi" next time.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Arbee

  • Full Member
  • ***
  • Posts: 223
Re: TColorButton
« Reply #13 on: September 13, 2011, 10:16:01 pm »
And I can confirm on a Mac.  You are indeed right ... it only "grays out" when the colorbutton itself gets disabled.
1.0/2.6.0  XP SP3 & OS X 10.6.8

Eclipticon

  • Jr. Member
  • **
  • Posts: 51
Re: TColorButton
« Reply #14 on: September 13, 2011, 11:28:00 pm »
Thanks ... would you suggest to file a bug report? If so, which component would one blame, the GroupBox or the ColorButton?
Lazarus 1.2.4 on Win XP/7 Virtual Machine

 

TinyPortal © 2005-2018