<html><head><style><![CDATA[#xf081f3107576428aae45dc8347ff04b0{
font-family:'Segoe UI';
font-size:12pt;
color:#000;
margin-left:0px;
margin-right:8px;
background-color:#FFF;
}
#xf081f3107576428aae45dc8347ff04b0{
font-family:'Segoe UI';
font-size:12pt;
}
#xf081f3107576428aae45dc8347ff04b0 blockquote.cite{
margin-left:5px;
margin-right:0px;
padding-left:10px;
padding-right:0px;
border-left:1px solid #CCC ;
}
#xf081f3107576428aae45dc8347ff04b0 blockquote.cite2{
margin-left:5px;
margin-right:0px;
padding-left:10px;
padding-right:0px;
border-left:1px solid #CCC;
margin-top:3px;
padding-top:0px;
}
#xf081f3107576428aae45dc8347ff04b0 a img{
border:0px;
}
#xf081f3107576428aae45dc8347ff04b0 li#xf081f3107576428aae45dc8347ff04b0 [style="'text-align: center;'"],#xf081f3107576428aae45dc8347ff04b0 li#xf081f3107576428aae45dc8347ff04b0 [style="'text-align: right;'"]{
list-style-position:inside;
}
#xf081f3107576428aae45dc8347ff04b0{
font-family:Segoe UI;
font-size:12pt;
}]]></style>
<style id="css_styles"><![CDATA[
blockquote.cite { margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc }
blockquote.cite2 {margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc; margin-top: 3px; padding-top: 0px; }
a img { border: 0px; }
li[style='text-align: center;'], li[style='text-align: right;'] { list-style-position: inside;}
body { font-family: Segoe UI; font-size: 12pt; }
]]></style>
</head>
<body><div id="xf081f3107576428aae45dc8347ff04b0"><div><div>Hi Lazarus team,</div><div><br /></div>
I've two issues with a ComboBox (csDropDown) control in Windows:<br /><div><br /></div><div>1. ComboBox.AutoSelect:=false isn't working. I seems that Windows always selects the whole ComboBox.Text at activation of the control.</div><div><br /></div><div>2. Changing the ComboBox.Font (.Style, .Size or .Color) overwrites the ComboBox.Text with the first matching item of ComboBox.Items.</div><div>ComboBox.Style is csDropDown. Look at this code:</div><div><br /></div>procedure TForm1.SpeedButtonTestClick (Sender: TObject);<br />begin<br /> ComboBox1.Clear;<br /> ComboBox1.Items.Add('Item0');<br /> ComboBox1.Items.Add('TestItem1');<br /> ComboBox1.Items.Add('Item2');<br /> ComboBox1.Text:='Test';<br /> if fsBold in ComboBox1.Font.Style then<br /> ComboBox1.Font.Style:=ComboBox1.Font.Style-[fsBold]<br /> else<br /> ComboBox1.Font.Style:=ComboBox1.Font.Style+[fsBold];<br /><div>end;</div><div><br /></div><div>ComboBox1.Text is set to 'TestItem1'.</div><div><br /></div><div>I'd a good look into customcombobox.inc and win32wsstdctrls.pp (Windows 10 x64, Lazarus 1.9 57316) trying to analyse this without any idea. Meanwhile I think that both issues are MS Windows ones. But I don't have a Linux environment to check it. Maybe someone else can do?</div><div><br /></div><div>Is there any interest in a patch to solve MS Windows issues although the patch would add some windows specific code to stdctrls.pp and customcombobox.inc? I've a solution for the "AutoSelect=false" one and an idea for the second one.</div><div><br /></div><div>Rolf</div></div></div>
</body></html>