Maybe my question is stupid, but i am confused about what units used when measuring size. In this case:
{type: “button”, value: “0”, width: 184, inputLeft: 14, inputTop: 369},
What is width “px” (pixels), “in" (inches), “pt” (points)?
Hello
Pixels
Ok, thank you!
But when I have form like this:
formStructure = [
{type:“settings”, position:“absolute”},
{type: “button”, value: “Button”, width: 80, inputLeft: 39, inputTop: 10},
{type: “combo”, width: 80, inputLeft: 39, inputTop: 37},
{type:“input”, value: “TextBox”, width: 80, inputLeft: 39, inputTop: 86},
];
The button is larger than other controls, although the width is the same. Is this a bug?
Ok, i will fix it.
But I’m interested in button.
This is all code:
formStructure = [
{type:“settings”, position:“absolute”},
{type: “button”, value: “Button”, width: 80, inputLeft: 39, inputTop: 10},
{type: “combo”, inputWidth: 80, inputLeft: 39, inputTop: 50},
{type: “input”, value: “TextBox”, inputWidth : 80, inputLeft: 39, inputTop: 86},
];
var myWins= new dhtmlXWindows();
var CurrentWindows = myWins.createWindow(“CurrentWindows”, 0, 0, 286.842, 216.684);
CurrentWindows.setText(“MainWindow”);
var CurrentWindowsForm = CurrentWindows.attachForm(formStructure);
And the Button is significantly more larger than other controls. Why is this difference despite the same width?
Hi
please specify exact version you’re using, I will attach a fix.
I use dhtmlxSuite_v43_std
Hi!
The problem with size is fixed, but the label of button is not centered.
That’s correct, I forgot css:
.dhxform_obj_dhx_skyblue div.dhxform_btn div.dhxform_btn_txt.dhxform_btn_txt_autowidth {
margin: 0;
width: 100%;
}
Thank you!
I have one more question, this time’s for label. Without explicitly set the width, label appear in multiple rows. What to change to stay in a row?
formStructure = [
{type:“settings”, position:“absolute”},
{type:“label”, label: “This is my label!”, labelLeft: 41, labelTop: 25},
];
lots of ways, for example:
{type:“label”, label: “This is my label!”, labelLeft: 41, labelTop: 25}
or via className attr