Jump to content

List Box and Windows


MobileWill

Recommended Posts

I am using window in a container and the list box doesn't work right. I have it hidden and then visible when a button was pressed. The list box parent is the that page so not tied to any of the other containers that are on top. The issue is I can't interact with it once its displayed on top of the container that has a window in it. 

Any ideas? It won't even scroll. Must be a conflict with the window or maybe the pixmap?

If I use the pixmap image as the drawing routine for the container do I need the window at all? Maybe if I remove the window then the list box will work. 

Link to comment
Share on other sites

I am not quite sure whether I understand your current situation so please forgive me if I am giving a misleading answer.

If you are using the image rendering routine of the container and you are using a pixmap instead of an image then you don't need an additional window to display the pixmap. If you are using the window for anything else then you obviously need it for that thing but the container doesn't require an additional window to use the image rendering routine (with or without using a pixmap as an image).

Link to comment
Share on other sites

I am a bit confused. Once you set the image as the draw routine. How do you link it to the pixmap object?

For the container I have

wi.customDraw = gwinContainerDraw_Image;

wi.customParam = gdispPixmapGetMemoryImage;

 

If I want can I set the custom draw later instead of on creation of the widget using gwinSetCustomDraw?

Link to comment
Share on other sites

8 hours ago, MobileWill said:

If I want can I set the custom draw later instead of on creation of the widget using gwinSetCustomDraw?

Yes, you can. Both the custom rendering routine as well as the custom parameter passed to that routine can be set either in the widget init struct or at any time during runtime using gwinSetCustomDraw().

 

7 hours ago, MobileWill said:

Any chance I can get a simple example of setting up the container?

There you go: container_pixmap_example.zip

This is what it should look like:

pixmap_expected_result.png.dc2b7623bcf40

Link to comment
Share on other sites

Thanks. Looks like I was pretty close. But I am hitting GDISP_IMAGE_ERR_BADFORMAT. Which happened last night. It was unhanded exception and then finally got the GDISP_IMAGE_ERR_BADFORMAT. 

I know the surface works because I can Blit it and it shows correctly. 

I am PM you when my code in a bit.

Edited by MobileWill
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...