Hello Dave, A complete working example that demonstrates the problem is much appreciated. And what version of Wt are you using? Did you verify that the error still exists in the most recent git version of Wt?
BR, Wim. 2012/9/23 Dave Betz <[email protected]>: > Using Firefox 12, Fedora 15. > > I have a few draggable WTexts which are positioned correctly in the browser > window They rest inside a few container widgets which are controlled by > layouts. > > Oddly, when I click on one of the WTexts, it repositions itself to a different > area of the window. I can click and drag on it, but it is incorrectly > repositioned. > > Here is a fragment of the relevant code (I've had to truncate this as I'm > using gmane web interface): > > class CreateTestWidget : public Wt::WContainerWidget { > Wt::WContainerWidget *hBoxContainer_; > Wt::WHBoxLayout *hBoxLayout_; > Wt::WContainerWidget *testLabelVBoxContainer_; > Wt::WVBoxLayout *testLabelVBoxLayout_; > std::vector<Wt::WText *> testLabels_; > Wt::WTable *testTable_; > > std::vector<Wt::WText *> problemDescriptions_; > public: > CreateTestWidget(void){ > // addWidget(new Wt::WText("Hello")); > > problemDescriptions_.push_back(new Wt::WText("addition: 1..5")); > problemDescriptions_.push_back(new Wt::WText("multiplication: 1..5")); > > hBoxContainer_=this; > hBoxLayout_=new Wt::WHBoxLayout; > testLabelVBoxContainer_=new Wt::WContainerWidget; > testLabelVBoxLayout_=new Wt::WVBoxLayout; > testLabelVBoxLayout_->addWidget(problemDescriptions_[0]); > testLabelVBoxLayout_->addWidget(problemDescriptions_[1]); > testLabelVBoxContainer_->setLayout(testLabelVBoxLayout_); > hBoxLayout_->addWidget(testLabelVBoxContainer_); > > problemDescriptions_[0]->setDraggable("x-Didacticum-problem_type"); > problemDescriptions_[1]->setDraggable("x-Didacticum-problem_type"); > > #if 1 > testTable_=new Wt::WTable; > testTable_->setHeaderCount(1,Wt::Horizontal); > testTable_->elementAt(0, 0)->addWidget(new Wt::WText("Numbers")); > testTable_->elementAt(0, 1)->addWidget(new Wt::WText(" ")); > testTable_->elementAt(0, 2)->addWidget(new Wt::WText("Description")); > testTable_->elementAt(1, 0)->addWidget(new Wt::WText("3")); > testTable_->elementAt(1, 1)->addWidget(new Wt::WText(" ")); > testTable_->elementAt(1, 2)->addWidget(new Wt::WText("Item")); > testTable_->elementAt(2, 0)->addWidget(new Wt::WText("4")); > testTable_->elementAt(3, 1)->addWidget(new Wt::WText(" ")); > testTable_->elementAt(3, 2)->addWidget(new Wt::WText("Item")); > > hBoxLayout_->addWidget(testTable_); > #endif > hBoxContainer_->setLayout(hBoxLayout_); > } > }; > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://ad.doubleclick.net/clk;258768047;13503038;j? > http://info.appdynamics.com/FreeJavaPerformanceDownload.html > _______________________________________________ > witty-interest mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/witty-interest ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
