Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-02

Issues resizing a TComboBox

14 messages · 7 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

I have heard many times that widgetsets like Win32 and Qt doesn't allow TComboBox to be resized. Or makes in very difficult. Apparently the widgetset will automatically adjust the Height of such a component.

Mantis contains bug reports as follows:
http://bugs.freepascal.org/view.php?id=10840

I'm just curious. Why would the widgetset want to force autosize on a TComboBox, but not on a TEdit? A TEdit also contains text and can have different font styles, it just doesn't contain a embedded button. So again, why can TEdit be resized at will, but TComboBox not. I fail to see the reasoning (technical or otherwise) behind that.

PS:
I know this is not something introduced by LCL, but rather the underlying native widgetset.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Felipe Monteiro de Carvalho
to Graeme Geldenhuys
Graeme Geldenhuys wrote
I'm just curious. Why would the widgetset want to force autosize on a TComboBox, but not on a TEdit?

Because on many platforms TMemo = multiline TEdit. So TEdit must support several lines in order to also be a TMemo, and thus must support several sizes.

Felipe Monteiro de Carvalho

Reply by email

Graeme Geldenhuys
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote
Because on many platforms TMemo = multiline TEdit. So TEdit must support several lines in order to also be a TMemo, and thus must support several sizes.

Ah, thanks Felipe. So I guess the same applies to TLabel. Some platforms support multi-line labels, so resizing must be permitted.

PS:
Would the TComboBox adjust it's Height automatically (at runtime) when the system or application wide font gets changed? I guess this could cause overlapping component issues, unless a layout manager or well designed Alignment properties have been set.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Mattias Gärtner
Mattias G?rtner wrote
A layout manager is a good idea. Do you have an idea how to automatically apply a layout manager to an existing fixed layout form? That would be great.

I'm working on that using a MigLayout manager. I'm starting to like the idea of layout manager more and more.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Bee
to Graeme Geldenhuys: I have heard many times that widgetsets like Win32 and Qt doesn't allow TComboBox to be…

I also don't understand this issue from LCL point of view. I used to able to resize TComboBox on Delphi (7). It's just a matter of some properties value setting.

-Bee-

has Bee.ography at:
http://beeography.wordpress.com

Graeme Geldenhuys wrote 23 lines
Hi, I have heard many times that widgetsets like Win32 and Qt doesn't allow TComboBox to be resized. Or makes in very difficult. Apparently the widgetset will automatically adjust the Height of such a component. Mantis contains bug reports as follows: http://bugs.freepascal.org/view.php?id=10840 I'm just curious. Why would the widgetset want to force autosize on a TComboBox, but not on a TEdit? A TEdit also contains text and can have different font styles, it just doesn't contain a embedded button. So again, why can TEdit be resized at will, but TComboBox not. I fail to see the reasoning (technical or otherwise) behind that. PS: I know this is not something introduced by LCL, but rather the underlying native widgetset. Regards, - Graeme -

Reply by email

Mattias Gärtner
to Graeme Geldenhuys: I'm working on that using a MigLayout manager. I'm starting to like the idea of layout…

Zitat von Graeme Geldenhuys :

Show quoted text 8 lines
On 18/02/2008, Mattias G?rtner wrote: > > A layout manager is a good idea. Do you have an idea how to automatically apply > a layout manager to an existing fixed layout form? That would be great. I'm working on that using a MigLayout manager. I'm starting to like the idea of layout manager more and more.

Do you have already ported the MiG layout manager?

Mattias

Reply by email

Graeme Geldenhuys
to Mattias Gärtner
Mattias G?rtner wrote
Do you have already ported the MiG layout manager?

About 50% done already... I started it mainly for fpGUI, but now the idea is to keep the MiG layout code as clean as possible so I can implement it for LCL as well. Both toolkits can do with a nice layout manager. LCL maybe more so, because Lazarus IDE could take advantage of the layout manager in all it's dialogs and various language translations - clipping text will be a thing of the past.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Mattias Gärtner
to Graeme Geldenhuys

Zitat von Graeme Geldenhuys :

Show quoted text 10 lines
On 18/02/2008, Mattias G?rtner wrote: > > Do you have already ported the MiG layout manager? About 50% done already... I started it mainly for fpGUI, but now the idea is to keep the MiG layout code as clean as possible so I can implement it for LCL as well. Both toolkits can do with a nice layout manager. LCL maybe more so, because Lazarus IDE could take advantage of the layout manager in all it's dialogs and various language translations - clipping text will be a thing of the past.

Any idea how the MiG manager can be used in a visual designer?

Mattias

Reply by email

Graeme Geldenhuys
to Mattias Gärtner
Mattias G?rtner wrote
Any idea how the MiG manager can be used in a visual designer?

I'm still working on ideas. One is a TForm that knows about layouts but are deactive by default (not a great solution). Alternatively a non-visual component you can place on a form which acts like a container.

MiG layout seems to be geared more at non-visual form design, but I am sure one can figure out a way of getting it to interact with a visual form designer. Anything in software is possible. :)

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Michael Van Canneyt
to Mattias Gärtner: Zitat von Graeme Geldenhuys : Any idea how the MiG manager can be used in a visual…
Mattias G?rtner wrote 14 lines
Zitat von Graeme Geldenhuys : > On 18/02/2008, Mattias G?rtner wrote: > > > > Do you have already ported the MiG layout manager? > > About 50% done already... I started it mainly for fpGUI, but now the > idea is to keep the MiG layout code as clean as possible so I can > implement it for LCL as well. Both toolkits can do with a nice layout > manager. LCL maybe more so, because Lazarus IDE could take advantage > of the layout manager in all it's dialogs and various language > translations - clipping text will be a thing of the past. Any idea how the MiG manager can be used in a visual designer?

Last time I discussed this with Graeme, I think I asked him to put it in a list of objects, so I imagine that there will simply be a collection which can be manipulated in the IDE.

Michael.

Reply by email

Mattias Gaertner
to Michael Van Canneyt: Last time I discussed this with Graeme, I think I asked him to put it in a list of…
Show quoted text 23 lines
On Mon, 18 Feb 2008, Mattias G?rtner wrote: > Zitat von Graeme Geldenhuys : > > > On 18/02/2008, Mattias G?rtner wrote: > > > > > > Do you have already ported the MiG layout manager? > > > > About 50% done already... I started it mainly for fpGUI, but now > > the idea is to keep the MiG layout code as clean as possible so I > > can implement it for LCL as well. Both toolkits can do with a > > nice layout manager. LCL maybe more so, because Lazarus IDE could > > take advantage of the layout manager in all it's dialogs and > > various language translations - clipping text will be a thing of > > the past. > > Any idea how the MiG manager can be used in a visual designer? Last time I discussed this with Graeme, I think I asked him to put it in a list of objects, so I imagine that there will simply be a collection which can be manipulated in the IDE.

You must be joking. Even coding is more comfortable than that. Or am I missing something?

Mattias

Reply by email