hi, Zhitao:
I test it, that is ok based on the wt-2.99.1 on Ubuntu, the sample is below
#include <WApplication>
#include <WEnvironment>
#include <WDatePicker>
#include <WText>
#include <Ext/ToolBar>
using namespace Wt;
class Test : public WApplication {
public:
Test(const WEnvironment& env);
private:
WDatePicker *todate_;
};
Test::Test(const WEnvironment& env)
:WApplication(env) {
Ext::ToolBar *bar_ = new Ext::ToolBar(this->root());
bar_->addSeparator();
bar_->add(new WText("from"));
WDatePicker *fromdate_ = new WDatePicker();
bar_->add(fromdate_);
fromdate_->setFormat("yyyy-MM-dd");
bar_->add(new WText("to"));
WDatePicker *todate_ = new WDatePicker();
bar_->add(todate_);
todate_->setFormat("yyyy-MM-dd");
bar_->addSeparator();
WText *hideFrom_ = new WText("hideFrom");
bar_->add(hideFrom_);
WText *showFrom_ = new WText("showFrom");
bar_->add(showFrom_);
showFrom_->hide();
hideFrom_->clicked().connect(SLOT(fromdate_, WWidget::hide));
hideFrom_->clicked().connect(SLOT(hideFrom_, WWidget::hide));
hideFrom_->clicked().connect(SLOT(showFrom_, WWidget::show));
showFrom_->clicked().connect(SLOT(fromdate_, WWidget::show));
showFrom_->clicked().connect(SLOT(hideFrom_, WWidget::show));
showFrom_->clicked().connect(SLOT(showFrom_, WWidget::hide));
}
WApplication *createApplication(const WEnvironment& env) {
WApplication *app = new Test(env);
return app;
}
int main(int argc, char **argv) {
return WRun(argc, argv, &createApplication);
}
2009/8/17 ZhiTao Chen <[email protected]>
> Thank you for your patience Zhimin,Maybe your suggestion is OK,but I'm
> afraid it will leads to some hardworking UI coding.
> I tried WDatePicker before,it didn't show properly in Ext::Toolbar,seemed
> as of z-order problem.
> I'm not familiar with JS & CSS,so it's hard for me to manually reposition
> the UI elements.
>
> As I said before, with lineEdit's focussed signal, I got a working solution
> now.
> I just don't understand why Ext::DateField has such a problem,it shouldn't.
>
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest