Nokia S-40 LWUIT list scrolling issue - list

I've a List in my app and when I do the scroll over all the screen, the List use to set in the first element, I meant the user is sent to the beginning of the list if I make the gesture painted with the red arrow.
Anybody knows anything about this issue?
ADD
Video

I'm not sure about the S40 port since I'm not sure what they did there. Many of these things relate to placing a List within a scrollable container rather than placing it in the center of a non-scrollable container.

Related

wxWidgets Overlay Text (C++)

I am trying to place some overlay text over a wxPanel.
I have several panels with completely different Content but I want to place this overlay text over all of these panels in the top right Corner of the panel.
I am restricted to wxWidgets 2.8.12..
Do you see any way to achieve this behaviour?
Edit:
Here a bit more detailed Version of what I am trying to do:
I have a Layout that consists of e.g. 5 containers and each container can contain a module. A module can be either wxPanels that contain Plain text or Input controls or for example a OpenGL canvas or an Image or something else.
Because I have much content and it does not fit on a single page I want to make the modules inside a Container exchangeable. It would be also nice if the user is able to perform this action only by using its keyboard. E.g. if he presses the key "3" the content of the third container has to be switched.
To handle these shortcuts isn't a problem. However I need to signalize to the user the identifier / hotkey of the containers.
I could do this by placing a additional headline above each container, but I want to waste as little space as possible on the gui.
I also could draw directly to the modules content, but I would have to do this for every module and every module is designed in a different way (images, multi column, opengl, ...) and maybe even by different persons.
So I am looking for a simple solution to indicate the number of these containers that does not consume that much space.
Thanks for your help
You can use a wxWindowDC to draw anywhere on the window, even on child windows. However anything you draw will be painted over whenever the windows or controls repaint themselves. You can draw your overlay in an UpdateUI event handler to minimize this. I have used this approach with success on Windows with wxWidgets 2.8.12. Not sure if it works with OpenGL though.

How can I add a vertical scroll to the list in Brightscript?

I am trying to customize the video player example that comes with the SDK. I am displaying the videoplayer on the left side of the screen and the playlist on the right side with the navigation through this playlist.
However I am able to display only few videos on the rightside. Hence I need to add scroll to the playlist so that I can display all the videos there.
I have reserched on it and found the rotextscreen that provides scroll but that opens a whole new screen which doesnot serve my purpose as I want to show the playlsit on tthe right side of the player more like you tube.
I cannot use Rogridscreen for the same reason as rotextscreen.
Is there any other component i can use to display the playlist and add the vertical scroll to the playlist or any other approach I can take??
I am a bit lost at the moment. Any suggestions would be really appreciated.
Have a look at roListScreen, a scrollable list will be on the left

codename one - no way to set background image in list

I am new to codename one and I have tried for one and half day to fix my issue of,
a list with background image in each row.
Let me explain, I am having a list with some items(entries), I created renderer and name it appropriately. I set background correctly which is reflecting in designer (see image)
but when I run it on simulator/device , all formatting and designs are just invisible..!! (see red arrow pointing to simulator in image)
anyone have any idea ? why this is happening ?
Thanks,
Akash
It seems you didn't set the background correctly in the designer. Since the list items in the model within the designer are strings the renderer entries don't get overriden and so you see a separate UI.
To reproduce the issue in the designer click the items entry in the list property, remove everything and add a sample key/value hashtable pair. You would see all your design entries disappearing.
This might help you understand how to customize images and backgrounds here: http://www.codenameone.com/3/post/2013/12/deeper-in-the-renderer.html

How to determine the content step value of scrollarea

I'm making my own UI from scratch using OpenGL that is why I'm asking this and please don't make any discouragement as this is just a hobby project.
Currently, I'm stuck implementing how this scrollbars really work. In my current implementation, the content scrolls at the wrong step value as well as the thumb, meaning, I set the value manually like 1px step for each of them.
The structure of my scrollbar implementation is describe as follows:
I draw scrollbars i.e the main rectangle where the 3 button lies.
Those 3 buttons are, thumb, buttonBack and buttonNext.
All of them do the basic logic of scrollbars i.e when I click each one of them, they moved. But the whole part(scrollbar) don't know how to scroll contents
So what I did is: I make another object and I call it scrollarea
It has two scrollbars, vertical and horizontal scrollbar.
I made a function called scrollToX and scrollToY which
does what I named to them.
But the step values I set to them are
manually set up.
I try to google some scrollbar, scrollarea, scrollview or whatever you call to that scrollable rectangle thing, but all I see are implementation and I cannot find any guides how to build your own. I have no choice but to look at their implementation. I try my best to comprehend what they did but their implementation of how their whole UI structure is very different to mine, and I cannot find anything useful there.
So I ask again here if anybody can explain me well how to make a properly functional scrollbar.
Most specific things I'm really concerned of are:
How do I determine the thumb step value?
How do I determine the content step value?
All of these depend on your content -
Is it just an image ? If so, you only need to change the offset depending on the size of the image.
Is it a list of values like in Windows explorer ? Then you need to create a data structure first that contains all of it, and shows the content that fits within the window as it scrolls.
OpenGL does not fit into this discussion.

Select underlying objects

Greetings!
I've made a program that lets you draw shapes. All shapes are contained in a vector. What I need help with is; when several shapes are stacked on top of each other, I want to cycle through them, top to bottom, if the user clicks repeatedly. I'm thinking something along the lines of:
Store every object under the mouse location where the user clicked in some sort of container
Keep track of which object was first in queue, and should be last (?) after the next click
Repeat step two until the user clicks somewhere that results in a different queue
This is more of a general programming question, rather than just C++, but any help would be greatly appreciated, and if that answer also provides a pretty solution in C++, all the better!
A popular approach to this is to assign each item a z-order. Items with higher z-order hide items with lower z-order if they overlap. In your case, you would just have to find all items below the cursor and rotate their z-orders when the user clicks.