Jump to content

[UAK] Scrolling the widget with MouseWheel or Slider


mekans
 Share

Recommended Posts

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

 

Link to comment
Share on other sites

Had to port to UAK 6 classes for that :DScroll 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);

image.thumb.png.70053abc55fc5e159f77514e5ea744b5.png

  • Like 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...