Menu

#119 widgets::textarea rows and cols attributes

cppcms-v1.0.x
closed
nobody
None
7
2014-10-30
2014-04-26
CN Liou
No

If both rows and cols attributes are set, the space between these two attributes is missing.

struct my_form : public cppcms::form {
    cppcms::widgets::textarea msg;
    my_form(){
        msg.message(_("Type Message Here"));
        msg.rows(2);
        msg.cols(80);
        add(msg);
    }
};

yields (note the missing space in rows="2"cols):

<label for="error">Type Message Here</label><span class="cppcms_form_input"><textarea id="error" name="_2" rows="2"cols="80"></textarea></span>

Changing line 727 for form.cpp from

        if(rows_ >= 0) {
            output<<"rows=\""<< cint(rows_) << "\"";
        }

to

        if(rows_ >= 0) {
            output<<"rows=\""<< cint(rows_) << "\" ";
        }

should be able to fix this issue.

Discussion

  • Artyom Beilis

    Artyom Beilis - 2014-05-23

    Fixed in changeset #2245

     
  • Artyom Beilis

    Artyom Beilis - 2014-05-23
    • status: open --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.