mekans Posted July 23, 2023 Share Posted July 23, 2023 Hi there, I've got custom widget, and i would like to find how to scroll down the data in it. Let's get for example the topic you already helped me with, if i get huge amount of the data in this table, how would i scroll down this custom widget? I've discovered MouseWheel(const int delta, const int x, const int y), and i know the slider exists, but i got problem with my custom widget. Thanks for any help Quote Link to comment Share on other sites More sharing options...
Dreikblack Posted July 24, 2023 Share Posted July 24, 2023 Had to port to UAK 6 classes for that Scroll Container.zip This is container that have scroll bars if content of it bigger that its size. You can modify table widget to increase own height when adding a new row. Call container->updateInnerContainerSize() while doing that, Use case: auto contaier = Container::create(10, 10, 600, 200, ui->root, CONTAINER_SCROLL); contaier->addWidget(listView); 1 Quote Link to comment Share on other sites More sharing options...
Dreikblack Posted July 24, 2023 Share Posted July 24, 2023 Mouse scroll works only if scroll bar in focus (cursor on it). But you can fix it by overriding a table or other custom widget method: void ListView::MouseWheel(const int delta, const int x, const int y) { GetParent()->MouseWheel(delta, x, y); } 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.