Search Results

Search results 1-20 of 59.

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

  • Yes, GUI_MAKE_COLOR is doing its job, but if I assign the ARGB-image to the IMAGE widget then the image in GUIBuilder looks like red and blue are swapped . Alex.

  • Ok, Sven, thanks for clarifying, but one thing stops me from using ARGB. It is GUIBuilder that works in ABGR mode . So the colors look incorrectly. I got used to it for creating dialogs. Alex.

  • Hello, Sven, This appears in simulation v5.44 (GUISim.lib from SEGGER package) and on real hardware using STemWin v5.44 (STemWin_CM7_wc32_ot.a from ST package). I'm using ABGR mode (GUI_USE_ARGB is set to 0) so we don't need to clear "alpha byte" of the color value. "...GUI_GREEN & ~0xFF000000..." didn't change anything on my side. If I comment GUI_EnableAlpha(0) transparency is not lost (understandably) and of course it would slow down the system. upd: on the hardware driver is GUIDRV_LIN_16, c…

  • 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.

  • Hello, maybe we should place two scales (gray and colored) at one position in an exact matching using IMAGE widgets. Then invalidate colored bar image within the area related to the bar value using WM_SetUserClipRect() function. Just a simple code: C Source Code (85 lines)Alex.

  • Hello to everyone, I have a question implementing a listwheel with semitransparent rounded rect as a background. Here is the code for 320 * 240 desktop: C Source Code (62 lines)All is ok until listwheel reacts on moving. Then it loses transparency. It is solved with using a memory device: C Source Code (73 lines)Now all is ok. But why it is not working when drawing "on the run"? Thanks, Alex.

  • Hello, to awneil's link I would add the latest package for STM32H7 that contains a later version 5.44: st.com/en/embedded-software/stm32cubeh7.html Unfortunately, STM32CubeMX doesn't contain code generation scripts with STemWin GUI for STM32H7 so far. So you need to configure it by yourself. Alex.

  • Fixed widget for all windows

    LexaGb - - emWin related

    Post

    Hello, three ways come to mind: 1. Placing your fixed widgets in one of the windows (also in GUIBuilder). When you go to the other page (if using MULTIPAGE widget) or just change a window then you can reattach these fixed widgets to the new selected window using WM_AttachWindow()/WM_AttachWindowAt(). 2. Placing fixed widgets in a separate window that is always visible. 3. Multilayer can be used. Then you just place fixed widgets in a different layer so that these widgets always could be visible …

  • Hello, Sven, ok, thanks for clarifying. Alex.

  • Hello to everyone, I'm trying to implement a simple knob using memory devices containing transparency. Memory device for the knob is displayed correctly whereas memory device for the background loses its transparency. When checking data at the background device transparency is present. Here is the code (screen size 320*240) and screenshots: C Source Code (87 lines)forum.segger.com/index.php/Att…405da85e6e135bbf5864f38bf Expecting to see the following: forum.segger.com/index.php/Att…405da85e6e135…

  • Works on my side, at first glance, in simulation version 5.44. Maybe additional code from your project affects the text visibility. Your new code using TEXT widgets instead of drawing text in WM_PAINT of the dialog. This updates the contains of the TEXT widgets in their WM_PAINTs when invalidating the dialog and its child widgets, and all the text drawing functions are called from the right places. Thus you can see the text in your dialog. Alex.

  • Hello, function for displaying text GUI_DispStringAt() is the drawing function and you should use any drawing functions in WM_PAINT message handler of your dialog. When you use GUI_Delay() from WM_INIT_DIALOG it calls dialog update and you see the result of PROGBAR_SetValue()/WM_HideWin(). It is recommended to use GUI_Exec()/GUI_Delay() from the separate task. But if you want to do it your way, then use a custom flag and pass it to the WM_PAINT handler. C Source Code (86 lines)Alex.

  • Hello, it is nothing wrong with your dialog. The WM_CREATE message is for simple windows. For dialog windows you should use the WM_INIT_DIALOG message instead of WM_CREATE. Just change it in your callback _cbLoading(). Also you should call any drawing functions from callbacks in WM_PAINT message. If you want to achieve the black background on your dialog then you can use a special function for this purpose WINDOW_SetBkColor(). C Source Code (14 lines) Once you set it in WM_INIT_DIALOG it will dr…

  • Hello, thanks for the code, Sven. I realized that the inner color should be the background color. Sometimes it needs not to paint over the backround contents behind the polygon like in my case. I'm working on custom widget "gauge meter" that may have only the contour with transparent background so meter contents behind it should be visible. In this case as far as I understand memory device is the best solution. Alex.

  • Solved with using memore device so far. C Source Code (35 lines)

  • traversing in emwin calendar

    LexaGb - - emWin related

    Post

    Hello, faced the same problem. But calendar in emWin doesn't have these options for fast navigation. If you want to implement a calendar like in Windows, then you need to do custom calendar using different emWin options (e. g. animation, memory devices). In my case I created an additional dialog window with some widgets: listwheel for changing months, spinbox for changing years, button for applying the changes and closing the dialog. This dialog appears on top of the calendar when clicking on th…

  • It seems that "undocumented" message with the code 0x240 is documented. In WM.h it is nothing less than WM_TOUCH!

  • Yes! Found it too ! But what if they change that undocumented code (0x240) in next releases... Why the collapse / expand of MENU widgets is not provided as API functions...

  • Hello, maybe it is just easier to make modal the keyboard window and after closing it pass the "modality" to the dialog window. C Source Code (125 lines)If you want to prevent user input only to opened submenu you must also prevent it to the other widgets (e. g. horizontal menu). It seems in this case you must catch PID-messages in corresponding callbacks (at least WM_TOUCH and WM_MOUSEOVER to prevent changing appearance of the menu items). Alex.

  • Hello to everyone, I'm working with the simulation (latest version 5.50) and I'd like to understand using GUI_AA_DrawPolyOutline()/GUI_AA_DrawPolyOutlineEx() functions. I want to draw a simple antialiased polygon with a frame filled with inner color. Here is the code: C Source Code (29 lines) The result is the polygon filled with the gray color instead of the red color. Using GUI_AA_DrawPolyOutlineEx() function ends up with the same result. forum.segger.com/index.php/Att…405da85e6e135bbf5864f38b…