View Issue Details

IDProjectCategoryView StatusLast Update
0010312LazarusLCLpublic2013-09-03 12:08
ReporterChris Rorden Assigned ToFelipe Monteiro de Carvalho  
Status closedResolutionfixed 
Product Version0.9.25 (SVN) 
Fixed in Version0.9.25 (SVN) 
Summary0010312: GTK2 TComboBox sizing issues
DescriptionWhen I create a program with Lazarus for WIndows, the TComboBox ALWAYS has a height of 21 pixels. If I attempt to change this in inspector or directly on the form I find that the size is squeezed to 21 pixels.

However, when I compile the same program to the GTK2 LCL on Linux, 21-pixels is not tall enough to show the default font (e.g. I can not see the descenders for a word like 'Gray'). While I can resize the TCOmboBox height on Linux (e.g. to 29-pixels), everytime the code is opened in WIndows it is automatically scaled to have a height of 21 pixels.

I think this should be consistent - either TComboBoxes should be allowed to be manaully sized on every platform, or they should autosize on every platform. At the moment, I have to manually adjust sizes everytime I move from Windows to Linux...
TagsNo tags attached.
Fixed in Revision14059
Attached Files


related to 0010626 closedFelipe Monteiro de Carvalho Progressbar with Height < 10 dont work correct 


Vincent Snijders

2007-11-30 21:58

manager   ~0016500

Possibly not a 1.0 feature.

Ales Katona

2007-12-01 13:34

developer   ~0016516

Changed to win32 issue, since this has to be fixed at win32 level (IMHO) considering the fact that other widgetsets can size their comboboxes. Autosizing isn't a bad idea tho, altough perhaps a bit limiting (someone in Qt/Gtk/Carbon might WANT to have a big combobox with smaller font in it).

In any case, this problem bothers me as well.

Felipe Monteiro de Carvalho

2008-01-24 10:44

developer   ~0017401

I did some googling, and it seams to be impossible to set the Height of a ComboBox on Windows. It adjusts the height automatically according to the font. So, IMHO the only feasable solution is to expand this behavior for all widgetsets: Ignore the Height property and autosize (on Windows automatically done always) to fit the Font Height.

I'm not exactly sure how to autosize according to the Font Height ... maybe Font.Height + Constant, where Constant could maybe be gotten from the widgetset or even (if nothing else possible is found) hard-coded. 6 would be a good start value in that case.

Felipe Monteiro de Carvalho

2008-02-09 22:47

developer   ~0017679

rev14058 Fixed part of the problem. Made TComboBox.AutoSize default to true. I and Mattias talked and arrived to the conclusion that this is the best solution.

Now Gtk2 just needs to set the correct Height for the ComboBox when autosizing.

Issue History

Date Modified Username Field Change
2007-11-30 20:07 Chris Rorden New Issue
2007-11-30 20:07 Chris Rorden Widgetset => GTK 2
2007-11-30 21:58 Vincent Snijders LazTarget => post 1.2
2007-11-30 21:58 Vincent Snijders Note Added: 0016500
2007-11-30 21:58 Vincent Snijders Status new => acknowledged
2007-12-01 13:34 Ales Katona Widgetset GTK 2 => Win32
2007-12-01 13:34 Ales Katona Note Added: 0016516
2008-01-24 10:44 Felipe Monteiro de Carvalho Note Added: 0017401
2008-02-09 21:52 Felipe Monteiro de Carvalho Status acknowledged => assigned
2008-02-09 21:52 Felipe Monteiro de Carvalho Assigned To => Felipe Monteiro de Carvalho
2008-02-09 21:52 Felipe Monteiro de Carvalho Relationship added related to 0010626
2008-02-09 22:47 Felipe Monteiro de Carvalho Note Added: 0017679
2008-02-09 23:06 Felipe Monteiro de Carvalho Fixed in Revision => 14059
2008-02-09 23:06 Felipe Monteiro de Carvalho Status assigned => resolved
2008-02-09 23:06 Felipe Monteiro de Carvalho Fixed in Version => 0.9.25 (SVN)
2008-02-09 23:06 Felipe Monteiro de Carvalho Resolution open => fixed
2008-04-24 00:05 Marc Weustink Status resolved => closed
2013-09-03 12:08 Martin Friebe LazTarget post 1.2 => 1.4