Align Text in Combobox

后端 未结 6 536
后悔当初
后悔当初 2020-12-09 05:42

I want to align my text in combo box so that it will show in the center of combobox tell me how to do this also you can see there is a default border around a combo box when

6条回答
  •  执念已碎
    2020-12-09 06:22

    you can do something like this by adding space before Display member in your Query

    for example :

    combobox1.DataSource = Query(Select col1 , ('   '+col2) as Col2 from tableName) 
    combobox1.DisplayMember = "Col2";
    combobox1.ValueMember = "col1";
    

提交回复
热议问题