Project

General

Profile

Actions

Bug #4766

open

setBorder doesn't affect WCheckBox

Added by Julien Ladge over 8 years ago. Updated over 8 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
Target version:
-
Start date:
02/24/2016
Due date:
% Done:

0%

Estimated time:

Description

This kind of code :

Wt::WCheckBox * check = new Wt::WCheckBox();
check->decorationStyle().setBorder(Wt::WBorder(Wt::WBorder::Solid, Wt::WBorder::Thin, Wt::WColor(120,255,0,255)));{code}

leads to generate to the tag:

border-color: rgb(120, 255, 0);
border-style: solid;
border-width: thin;

This code doesn't work on firefox (44.0.2). If I want to get borders on checkbox, I have to add manually in tag (tested with firebug):

outline:solid thin rgb(120,255,0)
Actions #1

Updated by Koen Deforche over 8 years ago

  • Status changed from New to Feedback
  • Assignee set to Koen Deforche

That a checkbox doesn't react cross-platform to CSS 'border-' properties, is not something I believe we should try to solve in Wt. I think the CSS specification is in fact unclear to what it really means for a checkbox, and I would be surprised if this is the only odditiy related to it. You are free to provide styling using a CSS declaration in an external style sheet (see WApplication::useStyleSheet()) :

input[type='checkbox'] {
   outline:solid thin rgb(120,255,0)
}
Actions

Also available in: Atom PDF