Tri-state checkboxes

Bug reports will be moved here when the described bug has been fixed

Moderators: Hacker, petermad, Stefan2, white

Giovanni
Member
Member
Posts: 154
Joined: 2005-03-23, 18:28 UTC

Tri-state checkboxes

Post by *Giovanni »

There is a difference in the way that tri-state checkboxes work between 32 and 64 bit versions.

Example: Commands > Search > Advanced > Attributes > Click an attribute

32bit: mixed -> unchecked -> checked -> mixed -> ...
64bit: mixed -> checked -> unchecked -> mixed -> ...

The 32bit version is the one the is the same as previous TC versions.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Confirmed with TC8x64b2. It seems to be related to with ALL 3-state checkboxes (including thoose in Attributes dialog). It is bad that Lazarus doesn't follow Delphi here.
User avatar
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

MVV wrote:It is bad that Lazarus doesn't follow Delphi here.
Shouldn't be a Lazarus-Delphi inconsistency. It looks like a difference between 32 and 64 bit compiler versions or something similar. Funny...
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

wanderer, don't forget that TC8x32 is still compiled with Delphi 2 while TC8x64 is compiled with Lazarus x64.
User avatar
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

MVV wrote:wanderer, don't forget that TC8x32 is still compiled with Delphi 2 while TC8x64 is compiled with Lazarus x64.
I thought they were both Lazarus?!?! I suppose Christian has confirmed what you say. I'd appreciate a link to the relevant topic.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Christian wrote many times that TC8x32 is still in Delphi, you may use forum search.

Also, you may compare EXE size of TC7x32, TC8x32 and TC8x64. TC8x64 size is doubled due to Lazarus.

At least, you may compare linker versions in PE headers of files. TC7x32 and TC8x32 have linker version 2.25 while TC8x64 has version 2.44.
Last edited by MVV on 2011-09-29, 10:29 UTC, edited 2 times in total.
User avatar
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

OK, got it. Thanks.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
User avatar
Kishiro
Junior Member
Junior Member
Posts: 23
Joined: 2005-03-19, 00:01 UTC
Location: Norway

Post by *Kishiro »

Confirmed.

I took me some time to realize this, I thought my keyboard was getting flunky. I use to remove archive and other attributes on text-files containing notes of stuff I plan on doing once I have finished the tasks therein. I do this quite often, and I do it all with the keyboard rather fast (1.1 seconds) sometimes without looking at the screen; mark files with insert, ALT-F -> Enter -> Space ->Tab -> Space -> Tab ->Space -> Tab -> Space -> Tab -> Space -> Enter

Suddenly because of the change in the tri-state behaviour I've started to set attributes on files where I intended to remove them... :shock:

I hope this can be fixed somehow... :cry:
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately this happens inside the Lazarus library - I haven't had the time yet to find a solution.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

It seems that we need to patch following piece of code:

Code: Select all

                if (Flags <> BST_CHECKED) or not (lWinControl is TRadioButton) then
                begin
                  if (Flags=BST_CHECKED) then
                    Flags := BST_UNCHECKED
                  else
                  if (Flags=BST_UNCHECKED) and
                     TCustomCheckbox(lWinControl).AllowGrayed then
                    Flags := BST_INDETERMINATE
                  else
                    Flags := BST_CHECKED;
                  //pass 0 through LParam to force sending LM_CHANGE
                  Windows.SendMessage(lWinControl.Handle, BM_SETCHECK,
                    Windows.WPARAM(Flags), 0);
                end;
It is in lcl\interfaces\win32\win32callback.inc file.
We need to change else Flags := BST_CHECKED to else Flags := BST_UNCHECKED because it is standard for Windows. :!:
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, exactly - in Delphi I could just override the "Toggle" method. This is used in Lazarus too, but only for hotkeys! So when you switch the language to English and press Alt+A in the attributes dialog, the order is like in the 32-bit version...
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I have same orders for both RU and EN keyboard layouts and for all TC languages - first state after grayed one is checked. Just like above mentioned piece of code does.
Giovanni
Member
Member
Posts: 154
Joined: 2005-03-23, 18:28 UTC

Post by *Giovanni »

ghisler(Author) wrote:press Alt+A in the attributes dialog, the order is like in the 32-bit version
I confirm that the ALT+A method works, but using the mouse (or tabbing and pressing the spacebar) is still reversed in beta 3.
User avatar
Flint
Power Member
Power Member
Posts: 3503
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

Confirm fixed tri-state order in 8.0β4.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
Giovanni
Member
Member
Posts: 154
Joined: 2005-03-23, 18:28 UTC

Post by *Giovanni »

Indeed - thank you very much Christian!
Post Reply