Groupbox - Setting a border radius

asked 2020-02-06 01:00:45 +0800

trulyitsalex gravatar image trulyitsalex
3 1

updated 2020-02-06 10:19:31 +0800

cor3000 gravatar image cor3000
5384 2 7
ZK Team


I was wondering if it is currently possible to set a border radius on the border outline of a groupbox. I am currently using setting the style in Java as so:

Groupbox box = new Groupbox();
box.setTitle("Guest Name");

This doesn't actually apply a radius to the border; if there is a way could someone be kind enough to enlighten me?

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-02-06 10:17:38 +0800

cor3000 gravatar image cor3000
5384 2 7
ZK Team

updated 2020-02-06 10:19:16 +0800

it actually tries to apply the border radius, however it doesn't apply to the correct element:

You'll see what's going wrong, if you add a border. It applies to the dom element surrounding the .z-groupbox-header and -content element (most likely not what you want):

Groupbox box = new Groupbox(); 
box.setTitle("Guest Name"); 
box.setStyle("border-radius:10px;border: 1px solid red;");

In order to affect the existing borders/radius you have to style the header and content:

    .groupbox-rounded > .z-groupbox-header {
        border-radius: 10px 10px 0 0;
    .groupbox-rounded > .z-groupbox-content {
        border-radius: 0 0 10px 10px;
  <groupbox title="my group box" sclass="groupbox-rounded" width="150px">
    some content with round corners

runnable on zkfiddle

From your java code you can then call groupbox.setSclass("groupbox-rounded") to activate the style.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2020-02-06 01:00:45 +0800

Seen: 6 times

Last updated: Feb 06

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More