View Issue Details

IDProjectCategoryView StatusLast Update
0031986PackagesLCLpublic2017-10-19 09:33
ReporterHandoko Assigned ToMichl  
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
PlatformLinuxOSUbuntu Mate 
Product Version1.6.4 
Summary0031986: TTabControl cannot use keyboard to switch tab (Gtk2)
DescriptionTTabControl cannot use keyboard to switch tab. I think it happens only on Gtk2. Because if I create Win32 binary and test it using Wine on my Linux machine, I can use left and right arrow keys to switch tab.

Behavior test result on Ubuntu Mate 16.10 64-bit Lazarus 1.6.4/1.8.0RC2 Gtk2:
- TabControl cannot switch tab using keyboard.
- TabControl can switch tab using mouse click no matter TabStop is true or false.

Behavior test result on Win32 (Wine on Ubuntu) Lazarus 1.6.4/1.8.0RC2:
- If (TabControl.TabStop = True) the TabControl can switch tab using left and right keys.
- If (TabControl.TabStop = False) the TabControl still can receive focus and can switch tab using left and right keys. It should not able to receive focus because TabStop = False.
- If (TabControl.TabStop = False) the active tab can receive focus using mouse click but cannot switch tab using mouse click.
- The color of the background is blue, why?

I also started a discussion on Lazarus forum:
http://forum.lazarus.freepascal.org/index.php/topic,37090.msg248855.html#msg248855
TagsNo tags attached.
Fixed in Revision56131
LazTarget-
WidgetsetGTK 2
Attached Files

Activities

Handoko

2017-06-09 10:04

reporter  

test.zip (128,386 bytes)

Michl

2017-10-19 08:54

developer   ~0103583

Last edited: 2017-10-19 09:02

View 2 revisions

> TabControl cannot switch tab using keyboard.

This, I fixed in revision 56131. Now the Tabs can be switched with arrow keys, like it is possible in other GTK2 apps I tested here (it also behaves now like Win32 and Qt). Tested with Linux Mint 17.3 KDE GTK2.


> TabControl can switch tab using mouse click no matter TabStop is true or false.

This is perfectly ok. The TabControl isn't deactivated it is simply not reachable per <Tab>.


The issue with selecting a tab per mouse (select the same tab twice) and switching it per keys, I can see and will try to find a fix.

Michl

2017-10-19 09:33

developer   ~0103584

> The color of the background is blue, why?

This is the default background color. You can see it by a simple test:

procedure TForm1.FormPaint(Sender: TObject);
begin
  Canvas.Brush.Color := clBackground;
  Canvas.FillRect(ClientRect);
end;

Maybe we can change it to clForm?! I will later test Delphi, how it works there.

Issue History

Date Modified Username Field Change
2017-06-09 10:04 Handoko New Issue
2017-06-09 10:04 Handoko File Added: test.zip
2017-10-17 21:48 Michl Assigned To => Michl
2017-10-17 21:48 Michl Status new => assigned
2017-10-19 08:54 Michl Note Added: 0103583
2017-10-19 08:54 Michl Fixed in Revision => 56131
2017-10-19 08:54 Michl LazTarget => -
2017-10-19 09:02 Michl Note Edited: 0103583 View Revisions
2017-10-19 09:33 Michl Note Added: 0103584