Search Results

Search results 1-20 of 76.

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

  • Hello, it is possible with using owner draw function where you can display multilined strings at dedicated item. C Source Code (72 lines)Alex.

  • Snapping time in a window motion

    LexaGb - - emWin related

    Post

    Hello, Florian, thanks for your answer. I'll try to explain better. As I see the variable Period also has an impact on the total moving time if we're starting a moving operation by a PID quite fast. So if we reduce Period value then it takes less time to stop (and therefore to snap) when we touch moving window by a PID with a fast click/release without capture. But then the total moving time is also declining if we allow it "go the whole way" without touch. So the problem is how to get a long mo…

  • Snapping time in a window motion

    LexaGb - - emWin related

    Post

    Hello, I'm working on a custom widget that would use motion (sort of horizontal listwheel or swipelist). And I'd like to reduce time for snapping the items to the snap position just like listwheel widget does . As far as I understand there is a variable Period in WM_MOTION_INFO structure that controls motion time depending on the start moving force by a PID. When I start moving the variable Period need to be a quite big value for a long time motion. When I want to stop my widget by a PID the sam…

  • PROGBAR doesn't change colors

    LexaGb - - emWin related

    Post

    Hello, to remove the progress value from the bar just call this with the empty string value: PROGBAR_SetText(hProg, ""). Alex.

  • Hello, it is probably because the buttons in the graph area are siblings to the graph. Just attach this buttons to the graph as child widgets using WM_AttachWindowAt(). Then the buttons will be always drawn after the graph is drawn so they should not disappear. Alex.

  • LISTVIEW - different styles

    LexaGb - - emWin related

    Post

    Hello, if it is just some kind of an event log then things are a bit easier. Indeed you can do a listview with one column and use default API functions for setting a bitmap and bk color for warning and fault messages. For messages with the parameters values you can use owner draw function for justifying the text on opposite sides of a row. Alex.

  • LISTVIEW - different styles

    LexaGb - - emWin related

    Post

    Hello, not exactly clear what you want, but if you need "Warning Description" instead of the header then just place another widget (text or image...) over the header. If you need to do something more complicated, exactly a row with "one column style" inside the listview table, then you can set owner draw function where you can get the coords of the row and then draw "overlay data" (text, bitmaps...) in WM_PAINT handler of the listview callback. Alex.

  • Dropdown widget issues

    LexaGb - - emWin related

    Post

    Hello, quite simple. C Source Code (35 lines)Alex.

  • Polygon Rotation

    LexaGb - - emWin related

    Post

    Yes, we could say that, I suppose. I would say, the term of the origin point is applicable when drawing the polygon. Rotation of the polygon is doing in relative coordinates. When we are drawing rotated polygon we set the origin point again for drawing it in right place. Alex.

  • Polygon Rotation

    LexaGb - - emWin related

    Post

    Hello, the coordinates of polygon are considered related to the origin point when drawing the polygon. When rotating the polygon the origin point is the pivot point of the polygon that can be inside and outside the polygon depending on its coordinates. Аfter rotation is done you can draw rotated polygon related to the new origin point. C Source Code (70 lines) Alex.

  • Dropdown widget issues

    LexaGb - - emWin related

    Post

    Hello, Quote from Electrons4me: “...I would have to draw all my primitives and text in the cbBackgroundWin() Callback... ” yes, that's right. If you are using widgets in your projects then you are using Window Manager and in this case you need to handle WM_PAINT message of the background window (desktop window in your case) and also draw all the additional graphics there. This is the way WM works and that is not only in emWin. WMs in Windows and other OS work the same way. Alex.

  • Hello, your question relates to the zooming capabilities of the GRAPH widget. Unfotunately the widget doesn't have such functions in the API list. It is works in mode "one pixel <-> one data point". So you need to draw it by yourself using user draw function. See description of the GRAPH_SetUserDraw() in the manual. Alex.

  • Hello, Mark, yes, GRAPH widget is not so easy, but when you get it about user draw function, you will able to draw a custom grid and manipulate the data to move the curves along the axes. Regarding the layers' contents: it's hard for me to say why the layer #0 data is visible together with the layer #1 data on your side. Just made a simple code with two layers (in simulation using SoftLayer feature). Layer #0 with a background window, layer #1 with a background window and main window with a memo…

  • Oh, I think it is just a little bug in the documentation . “Horizontal and vertical flags” make sense in case of text align related functions, probably this was copied from such function description or whatever and then the editor didn’t notice it to delete this phrase. Alex.

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

  • Hello, for aligning the text to the right after the bitmap you can increase the width of the tabs using MULTIPAGE_SetTabWidth() and then set text align to the right using MULTIPAGE_SetTextAlign(). With regard to the bitmap, yes, looks strange. Adding a bitmap for unselected state draws it also in selected state of the tabs. Try to use skinning option of the widget and manually draw the bitmap in unselected state. Before doing this just comment "MULTIPAGE_SetBitmapEx()" line. C Source Code (21 li…

  • Hello, first you can just create a memory device (if your emWin package contains that option) filled with transparency. C Source Code (10 lines) Then you draw the curve lines into the memory device and copy its content to the screen in WM_PAINT. Memory device will keep the previous curve line C Source Code (16 lines) Just curious why GRAPH widget with XY data is no good for you... Alex.

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