Search Results

Search results 1-20 of 84.

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

  • Overlapping Windows

    LexaGb - - emWin related

    Post

    Hello, I would do something like this: reattach dropdown's child listbox to desktop window when dropdown is expanded so it will allow listbox to paint within whole desktop area not only within parent dialog. I created some code for simple windows. I think this will work also on dialogs. C Source Code (62 lines)Alex.

  • Rotate image

    LexaGb - - emWin related

    Post

    Hello, with regard to ready-made API in emWin you can only rotate content of memory devices. These are memory areas where you can draw or copy any graphics including images. See chapter "Memory Devices" in the manual and description of the GUI_MEMDEV_Create(), GUI_MEMDEV_Rotate() in the memory device API list. There is also an example from SEGGER emWin simulation pack in the file MEMDEV_ZoomAndRotate.c Alex.

  • Degree symbol in GUI Builder

    LexaGb - - emWin related

    Post

    Hello, there is only support of the base ASCII set in text editable parameters of the widgets in GUIBuilder. The only thing you can do is generate the degree symbol as '°' in a text editor with extended symbols support (for example, in Word) and then paste it to the field "Content" of the text widget in GUIBuilder. Alex.

  • Hello, suppose there is no way to replace data in the current data handle. I'd do something like this: 1. Clear the graph from current data curve with GRAPH_DetachData(). 2. Delete and create a new data handler with the same handle variable using GRAPH_DATA_YT_Delete()/GRAPH_DATA_YT_Create(). If there is enough memory then don't delete a current data handle and simply create a separate data handler with recalculated data. 3. Attach new data curve to the graph with GRAPH_AttachData(). Alex.

  • Hello, if you're using only internal ram for keeping emwin pool and frame buffer I think it is too few for memory devices. Display driver just does data exchange with st7735. Memory size depends on color configuration you're using. For example, if your 2inch display has a resolution 128 * 128 then you need 64kb for a memory device with 32bpp color depth. It is a size of whole internal ram in stm32f103ve. Check return value of memory device creating function you're using. If it returns 0, it is m…

  • BUTTON - wrapped text

    LexaGb - - emWin related

    Post

    Hello, look at this: forum.segger.com/index.php/Thread/5802-button-and-wrap/ Alex.

  • Upd: you can do a little easier: set multilined string when call API function: LISTBOX_AddString(hLstbx, "Two lined\nitem 3"); and then handle only command WIDGET_ITEM_GET_YSIZE in your owner draw function to change the ysize of the item. Alex.

  • Hello, there is no difference how you are doing: whether you create a widget from resource table or create it manually. Resource table just calls the same creating API function with some basic parameters of a widget. So there is no configuration to do items with multilined text immediately when creating a listbox. My sample code just was easier to do creating a listbox directly using API. The main thing was to reveal the owner draw mechanism that would work in all the cases. Alex.

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