Search Results

Search results 1-20 of 45.

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Quote from SEGGER - Florian: “yes, this is doable. ” Hi Florian. Your way is not usable for me because I create multiple nested MULTIPAGEs (several MULTIPAGEs inside each of tab of top MULTIPAGE, see pictures), so I do not use the WINDOW handle of each nested MULTIPAGE, I am working only with and inside MULTIPAGE's callbacks. By the way, this above mentioned issue with MULTIPAGE concerns not only to the color. If there is a page with no focusable element and if this page is selected, but the key…

  • Quote from SEGGER - Florian: “About your question, when a new page is selected, a WM_NOTIFICATION_VALUE_CHANGED will be sent and the selection will be changed via MULTIPAGE_SelectPage(). ” Hi Florian. Is there a way to get a message about new selected page from assigned callback-function of MULTIPAGE-widget, not from callback of its parent window? Or how can I fix this issue with color of focused object, what is the best way?

  • Hello. I found the issue of MULTIPAGE-widget. If some page does not contain any focusable element (for example only TEXT or disabled all widgets) there is a coloring issue: if to return from this page to other page which contains the focusable element(s) then this focusable widget will not have a "focusable" color. A simple example demonstrates this issue. If you select page 1, then select page 2 and then select page 1 again you will see that no one button is colored as focused. This issue is pr…

  • Hello. How to get the height and width of the selected page (tab) of MULTIPAGE-widget ?

  • Dialog on top of dialog

    volodymyr - - emWin related


    Quote from evanb3: “Found solution, call WM_SetStayOnTop() after GUI_CreateDialogBox() ” Instead WM_SetStayOnTop() you can use the function WM_BringToTop() for each window or dialog which should be moved on top. But in some cases WM_SetStayOnTop() is very usable - it leaves window always on top even if it loses focus.

  • Determine widget focus

    volodymyr - - emWin related


    Quote from evanb3: “If I have several widgets in a window or dialog like edits/dropdowns etc, and 2 buttons that will be up and down for increment /decrement of values in edits/dropdowns widgets. How do you i determine which widget has focus ? and get the window handle of focused widget to manipulate it (up/down buttons will be set to not allow focus). Evan ” Use WM_GetFocussedWindow() - it returns the handle of currently focused object (window or widget).

  • Hello. If create a window by WINDOW_CreateEx with some non-zero id for this window, so WM_GetId returns always 0. C Source Code (2 lines)Is it bug? For other widgets, including FRAMEWIN-widget it returns correct value. Why you use type int for Id as parameter in all functions, although in fact the real Id-data is only I16 (short)? C Source Code (6 lines)It's very pity that full 32-bit int is not used for Id.

  • I think there is also a bug in code, because status MULTIPAGE_BI_UNSELECTED does not work. Anyway it is now tot actual for me, we decided not to use bitmaps in tabs.

  • Quote from LexaGb: “I'm using STemWin 5.44, so I don't have the sources and I can't see C-code where the states are OR-ed (except if look at assembler code). Can you see where it happens? However, calling MULTIPAGE_SetBitmapEx() with a mask instead of index doesn't change anything on my side. I thought when tabs' bitmaps are drawn the parameter MULTIPAGE_BI_... must be considered as an index value not as a mask... Alex. ” See official documentation (one page - in attachment).

  • Quote from LexaGb: “With regard to the bitmap, yes, looks strange. Adding a bitmap for unselected state draws it also in selected state of the tabs. ” Nothing strange, #define MULTIPAGE_BI_SELECTED is 0, and since all three states of this function are OR-ed, that means that state MULTIPAGE_BI_SELECTED is always present. Segger had to define set of bits for this (like 1 << 0, 1 << 1, 1 << 2) instead values 0, 1, 2.

  • Quote from Andrzej: “Thank you for the changes and comments on the programming style. Now I will check how it goes. ” To be perfect in style I changed in my code sample the name of function poster() to getPoster() because it is a best way to name such kind of functions.

  • Quote from Andrzej: “Thank you. However, I don't know how to integrate it into my program. I have the external variable "poster", they have to be numbers 1 to 6. They change in another part of the program. I want to display the variable value on an ongoing basis. I have prepared ID_TEXT_3 but I do not know how to display it to reflect the changes. ” I modified your code to have to compile it. I replaced your external int poster to function int poster(), that returns incremental int. Also I have …

  • Hello. I want to put image to all unselected Tabs of MULTIPAGE. But selected Tab should not have the image. If I use following code: C Source Code (2 lines)then I have the image on ALL tabs, including currently selected Tab. Also, I need to move the left-aligned text to the right to the width of the image so that it begins after the image. How to do it?

  • Quote from Andrzej: “How to display the variable value on the screen? ” Hello. If you need to display some variable with constant refreshing period (for example 200 ms) you can use Timer for it. Here is a small example that explains the principle: C Source Code (26 lines)

  • Hello. 1. How to get a number of added pages to the MULTIPAGE widget? P.S. For this question I have found a solution, it works, but I don't know whether it is safe and fully correct: C Source Code (4 lines) 2. How to get a width of Tab in MULTIPAGE widget? 3. How to calculate the precize width of Tab in pixels if there is a width of text (in pixels) for this Tab? Now I add 8 pixels, but I would like to know how much extra pixels I need to put the text without its clipping. 4. Maybe there is a fu…

  • Quote from LexaGb: “Hello, WM_GetUserData()/WM_SetUserData() is for simple windows. For widgets just use specific <WIDGET>_GetUserData()/<WIDGET>_SetUserData() functions. In your case it is BUTTON_SetUserData(). Calling WM_SetUserData() for the button may have caused button-specific parameters to overwrite. Alex. ” Thanks, Alex, you are right.

  • Hello, everyone. There is a DIALOG with one BUTTON, that has ExtraBytes. After storing data to the BUTTON-widget with WM_SetUserData the function WM_GetDialogItem for get BUTTON-widget returns 0. Here is source-code: C Source Code (61 lines)

  • Quote from SEGGER - Schoenen: “Hi, In the callback function of a window which shouldn't be touchable you have to react on WM_TOUCH and forward the message to its parent. Just like: C Source Code (13 lines)Didn't checked it, but it might be necessary to add the current windows origin to the coordinates. Regards, Sven ” Hello. I tried your sample, but it does not work or I do not understand something. Here is a small sample, there is a main window, there is a button on it, pressing this button cre…

  • Hello. How to make FRAMEWIN or DIALOG untouchable (insensitive to all mouse/touchpad events including all child-widgets)? I know that Ver. 5.50 already has the function WM_SetUntouchable(). But we are using 5.38.

  • Quote from Ross Lee: “When I design UI with emwin, I find that I can implement my interface with either frame, window or dialog, so my question is what's the difference between these three types? What is the application scenario for each type? Thank you. ” From my own experience: WINDOW - simple rectangle window for placing widgets or graphics on it. It has background, but does not have a border or title. FRAMEWIN - object, that has a frame (border and on top a horizontal place for title-string,…