View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0038126||Lazarus||LCL||public||2020-11-24 21:08||2020-12-01 23:58|
|Reporter||Galderius||Assigned To||Bart Broersma|
|Product Version||2.1 (SVN)|
|Summary||0038126: TComboBox always have BorderStyle bsSingle.|
|Description||BorderStyle of TComboBox can't be changed.|
|Steps To Reproduce||>Put a TComboBox in a form|
>BorderStyle is set to bsNone by default when bsSingle should be the default one
>TComboBox remain his border
>Change the property has no effect, border is always on
|Tags||No tags attached.|
|Fixed in Revision||r64169|
||Can you change BorderStyle of a TComboBox in Delphi (recent version)?|
Yes, I can, using these options: BevelInner, BevelOuter and BevelKind.
TComboBox Delphi.jpg (324,038 bytes)
That wasn't the question.
Does Delphi have a Borderstyle property that you can set for a TComboBox (and to which values)?
Delphi 7 doesn't have it.
> Delphi 7 doesn't have it.
And Delphi XE 10.3.3 either.
"Does Delphi have a Borderstyle property that you can set for a TComboBox?"
Yes, it has.
"and to which values?"
BevelInner, BevelOuter and BevelKind. See the screenshot above.
"Delphi 7 doesn't have it."
Delphi 7 is from 2002, the year of Windows XP. It's about 20 years ago.
Delphi XE 10.3 probably has it too in these properties.
For the last time:
The property you refer to in Delphi is called BevelEdges.
AFAICS form the attached screenshot from your Delphi, there is no property called BorderStyle
A borderstyle property would have values like bsIngle, bsNormal, bsNone etc. like you described in the "Steps To Reproduce".
So, Delphi does not have this property, at least not published.
Since I don't have a recent Delphi, I cannot check wether code like "Combobox1.BorderStyle := bsNone" would even compile in Delphi.
I don't see a Borderstyle property in Delphi 10.3
but there was a thread running in the forums about a borderless combobox for which I show a little code in how to do it but its only a windows piece of code..
I would suggest to go there and search the threads or start a new one on it, maybe.
||Delphi (10) does not have a Borderstyle property for TCombobox as it turns out.|
Setting Params.Flag(Ex) in TWin32WSCustomComboBox.CreateHandle like this (if BorderStyle = bsNone) has no effect
Params.Flags := Params.Flags and not WS_BORDER;
Params.FlagsEx := Params.FlagsEx and not WS_EX_CLIENTEDGE;
Looks like Windows doesn't support this at all?
On Windows it is not possible to remove the border by simply setting BorderStyle to bsNone.
You can sublass TComboBox and override Paint to achieve this if you really need it (example code can be found using Google).
I have documented this behaviour as being restricted for the Windows widgetset.
(You can see this in the "Restricted" tab of the ObjectInspector).
The reason we have this property is that some other widgetsets actually support this.
|2020-11-24 21:08||Galderius||New Issue|
|2020-11-24 22:22||Bart Broersma||Note Added: 0127163|
|2020-11-24 23:44||Galderius||Note Added: 0127164|
|2020-11-24 23:44||Galderius||File Added: TComboBox Delphi.jpg|
|2020-11-24 23:47||Bart Broersma||Note Added: 0127165|
|2020-11-24 23:50||Bart Broersma||Note Edited: 0127165||View Revisions|
|2020-11-25 00:17||wp||Note Added: 0127166|
|2020-11-25 01:32||Galderius||Note Added: 0127168|
|2020-11-27 14:48||Bart Broersma||Status||new => feedback|
|2020-11-27 14:48||Bart Broersma||LazTarget||=> -|
|2020-11-27 14:48||Bart Broersma||Note Added: 0127208|
|2020-11-27 16:04||jamie philbrook||Note Added: 0127211|
|2020-11-28 04:37||Galderius||Note View State: 0127164: private|
|2020-11-28 04:37||Galderius||Note View State: 0127164: public|
|2020-11-28 17:01||Bart Broersma||Note Added: 0127242|
|2020-11-28 17:41||Bart Broersma||Note Added: 0127245|
|2020-12-01 22:57||Bart Broersma||Assigned To||=> Bart Broersma|
|2020-12-01 22:57||Bart Broersma||Status||feedback => resolved|
|2020-12-01 22:57||Bart Broersma||Resolution||open => fixed|
|2020-12-01 22:57||Bart Broersma||Fixed in Revision||=> r64169|
|2020-12-01 22:57||Bart Broersma||Widgetset||Win32/Win64 => Win32/Win64|
|2020-12-01 22:57||Bart Broersma||Note Added: 0127310|