http://redmine.emweb.be/http://redmine.emweb.be/favicon.ico?16934085252016-07-05T12:13:56ZRedmineWt - Bug #5012: [3.3.6-rc2] PlaceholderText of WInPlaceEdit http://redmine.emweb.be/issues/5012?journal_id=152442016-07-05T12:13:56ZKoen Deforchekoen@emweb.be
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>InProgress</i></li><li><strong>Assignee</strong> set to <i>Roel Standaert</i></li></ul> Wt - Bug #5012: [3.3.6-rc2] PlaceholderText of WInPlaceEdit http://redmine.emweb.be/issues/5012?journal_id=154652016-07-08T08:21:56ZKoen Deforchekoen@emweb.be
<ul><li><strong>Status</strong> changed from <i>InProgress</i> to <i>Feedback</i></li><li><strong>Assignee</strong> deleted (<del><i>Roel Standaert</i></del>)</li><li><strong>Priority</strong> changed from <i>Normal</i> to <i>High</i></li></ul><p>I'm not entirely sure how to resolve this in the library. But can you not work around the issue like below?</p>
<pre><code>edit_ = new Wt::WInPlaceEdit();
edit_->setButtonsEnabled(false);
edit_->setPlaceholderText(WString("<i>not avaliable</i>"));
edit_->linedEdit()->setPlaceholderText(WString::Empty);
edit_->textWidget()->setTextFormat(XHTMLText);
</code></pre> Wt - Bug #5012: [3.3.6-rc2] PlaceholderText of WInPlaceEdit http://redmine.emweb.be/issues/5012?journal_id=154922016-07-08T17:08:33ZСтойчо Стефанов Stoycho Stefanov
<ul></ul><p>Hey,</p>
<p>In order to make this work around really work, you have to distinguish between the place holder of the WInPlaceEdit's "textWidget" and that of the "lineEdit", because in the current implementation you have a single place holders due to:</p>
<pre><code>const WString& WInPlaceEdit::placeholderText() const
{
return edit_->placeholderText();
}
</code></pre>
<p>The following do the trick:</p>
<pre><code>...
WString textPlaceHolder_;
...
void WInPlaceEdit::setPlaceholderText(const WString& text)
{
textPlaceHolder_ = text;
edit_->setPlaceholderText(text);
if (empty_)
text_->setText(text);
}
const WString& WInPlaceEdit::placeholderText() const
{
return textPlaceHolder_;
}
</code></pre>
<p>regards,<br><br>
Stoycho</p>
Wt - Bug #5012: [3.3.6-rc2] PlaceholderText of WInPlaceEdit http://redmine.emweb.be/issues/5012?journal_id=155352016-07-11T15:09:30ZKoen Deforchekoen@emweb.be
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Implemented @Emweb</i></li><li><strong>Assignee</strong> set to <i>Koen Deforche</i></li></ul><p>I've implemented the changes in WInPlaceEdit that you suggested.</p>
Wt - Bug #5012: [3.3.6-rc2] PlaceholderText of WInPlaceEdit http://redmine.emweb.be/issues/5012?journal_id=156522016-07-13T15:07:26ZKoen Deforchekoen@emweb.be
<ul><li><strong>Status</strong> changed from <i>Implemented @Emweb</i> to <i>Closed</i></li></ul>