Tuesday, March 20th 2018, 1:25am UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.



Date of registration: Jan 13th 2015

Posts: 29

Location: Germany


Friday, February 27th 2015, 1:01am

Text always on top...

Hello Adrian !

I tested the following:

GuiBuilder, create a window with a bitmap, a text and another bitmap. First bitmap is in background, then text and the second bitmap above the text (partially covered) as expected. Same in simulation, of course.
Changing the order in _aDialogCreate changes the order on the display as expected.

If I do not use IMAGE_SetBMP but GUI_DrawBitmap instead, the text (Text_CreateIndirect) will ALWAYS be in front of that picture! What is the reason for that?
I need that picture (Bitmap) covering text (overlay).

I think you will recommend a child window containing the other picture drawn with DrawBitmap. That window should be on top of the background with the text. This picture is intended to be used as a button/widget (therefore it will be drawn exactly in the area created with IMAGE_CreateIndirect in the DialogCreate).

I would like to do that in the area I created already in the main window. But then the text will be on top, not below. I do not understand why the text drawn "before" the picture remains in front. Is there a flag needed to change that behaviour?

IMAGE_SetBitmap works, but why does GUI_DrawBitmap not have the same result? I expect that this is always painted to the background.

Best regards,

Date of registration: May 26th 2009

Posts: 1,022


Tuesday, March 24th 2015, 11:59am

Hello HaJo,

Please note that there is a huge difference between drawing API and a widget. I would suggest you to refer to the chapter "The Window Manager" for detailed information on how windows are rendered.

Best regards,