naumova.natalya Posted April 9, 2019 Share Posted April 9, 2019 Hi! I use WidgetCanvas to create outlines like in tables. I also use WidgetScrollBox (to scroll table). So, the problem is: when one point of a polygon leaves visible area in scrollbox the whole polygon disappears. Is there any workaround? Or maybe I use canvas in a wrong way.. I've attached example code (when scrolling down very slowly you can notice that upper polygon disappears though it still has to be in its place). Also I found out that Gui::CHANGED callback for scrollbox works only when mouse is pressed onto scrolls. How can I detect using only mouse wheel? source.7z Link to comment
morbid Posted April 10, 2019 Share Posted April 10, 2019 Hello Natalya, Thanks for the sample, we've reproduced the issue. I'll write you back as soon as I get an update from the colleagues. We're currently busy with 2.8 release, so it will take a little bit longer than usual (I believe one or two days). How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
morbid Posted April 10, 2019 Share Posted April 10, 2019 Both issues are bugs and, I'm afraid, we can't offer you a workaround right now. May I ask you to explain, what exactly you want to do? Probably, there's another way to do this. And how urgent is this for your project? Thank you. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
naumova.natalya Posted April 10, 2019 Author Share Posted April 10, 2019 (edited) I'm trying to create a table class like in MS Excel (not through .ui but through C++ API). So the main idea is to create a container for widgets and draw borders around it. And I also need to scroll through this table (vertical and horizontal scrolls, example below). I need it as soon as possible... Edited April 10, 2019 by naumova.natalya Link to comment
morbid Posted April 11, 2019 Share Posted April 11, 2019 We've taken another look at this. 1. You can fix disappearing canvas polygon by deleting or commenting the following string: canvas->setPosition(10, 10); 2. Detecting mouse wheel can be done manually, by imitating a callback, for instance: if (App::get()->getMouseAxis(App::AXIS_Y) != 0) { // Do something... } Then check if scrollbar position was changed in the same AppWorldLogic::update(): if (scrollbox->getHScrollValue() != old_hscroll || scrollbox->getVScrollValue() != old_vscroll) { // Do something... } old_hscroll = scrollbox->getHScrollValue(); old_vscroll = scrollbox->getVScrollValue(); Please, let us know if this works for you. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
naumova.natalya Posted April 11, 2019 Author Share Posted April 11, 2019 it solves my problem, thank you! Link to comment
Recommended Posts