OAProfessor

Deep OA Product Insight

User Tools

Site Tools


checkboxsize

If your UI is using larger fonts (i.e. size 18 or bigger), you will notice that the box for the checkbox object is pretty small. This is a default size and is fixed by the stylesheet for OA. The way to fix such things is to define a special stylesheet and redefine some of the object properties.

For the checkbox, there are 2 keys you have change. We will need to create a stylesheet file in the config folder of your project (not in 3.1x/config folder!) or the config folder of your favorite library subproject. Here is my example: Checkbox.css

/* QCheckBox */ 
PanelQT MultiLabeledParent QCheckBox:indicator, QFileDialog QCheckBox:indicator {
                border: 1px solid black;
                width: 1.4em;
                height: 1.4em;
}
PanelQT MultiLabeledParent QCheckBox:indicator:checked {
                image: url(pictures:wf/stylesheet/checkbox_checked.png);
}

For this to be used by the system, you need to load this stylesheet for this object in the Initialize event for the checkbox object.

main()
{
  string filePath = getPath(CONFIG_REL_PATH, "Checkbox.css");
  this.styleSheet(filePath);
}

You may want to review other parameters which are defined in the 3.1x/config/stylesheet.css file. Don't edit that one, just copy the stuff you want to change into your own .css file. Notice that the object class is different in the standard stylesheet.css file. For your private use, look at the class definitions in this example.

checkboxsize.txt · Last modified: 2021/10/26 18:27 by toddmalone

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki