The example shows how we can tweak CSS to have state selector. The items of KoolComboBox are placed in table, the arrangement that we could not achieve with normal combobox.
<?php
require $KoolControlsFolder."/KoolComboBox/koolcombobox.php";
$kcb = new KoolComboBox("kcb");
$kcb->scriptFolder = $KoolControlsFolder."/KoolComboBox";
$kcb->styleFolder= "default";
$kcb->width = "186px";
$kcb->boxWidth="186px";
$kcb->boxHeight="234px";
$kcb->itemTemplate = "<div class='item'>{value}</div>";
$result = mysqli_query($db_con, "select ID,StateName from kcb_tbstates");
while($row=mysqli_fetch_assoc($result))
{
$kcb->addItem("State of ".$row["StateName"],$row["ID"]);
}
?>
<form id="form1" method="post">
<style type="text/css">
.kcbIn
{
line-height:23px;
padding:0px;
height : 25px;
width: 25px;
border-right : 1px dotted gray;
border-bottom : 1px dotted gray;
margin : 0;
cursor:pointer;
text-align:center;
}
.kcbItem { float : left ; }
</style>
<div style="padding-left:10px;padding-bottom:10px;">
<table style="width:350px;">
<tr>
<td>Choose US state:</td>
<td><?php echo $kcb->Render();?></td>
</tr>
</table>
</div>
</form>