Jump to content

wctltya

Members
  • Posts

    87
  • Joined

  • Last visited

Everything posted by wctltya

  1. Hi inmarket, is there any progress on that issue? BTW, I found that is not 100% true. For example .... ghTextedit_1= gwinTexteditCreate(0, &wi, 4); .... gwinSetText(ghTextedit_1, " ", true); and "back space" to clear " ", and then I type three chars ( for example '1', '2' and '3') at 3rd, one or two more chars appears (for example '@' or ' 8'), depends of which textdedit widget is on focus - there are three on the page I'm talking about. For example the results is "123@" or "123 8". If I don't cleat the " ", then the more chars are displayed at 2nd typed char, i.e. third on the field; Also if I set the text at creation time with wi.text = "1234"; then they displays: first "1234@", second "1234" (correct) and third "1234?". All three textedit widgets are created in a loop for{} if it does matter. but If I set them with gwinSetText(ghTextedit[i], "1234", TRUE); then all three works fine.
  2. Hi, 1. I set (by accident) a negative value for a Label width. The program crashes, don't dug into, but the uC resets after while. It's not WDT reset, because it's timeout is longer. 2. In a textedit widget I set the value (received by an interface in a buff) with gwinSetText(textedit_handler, buff, TRUE); , then it can be edited by the virtual keyboard. The program crashes on pressing any keyboard button, if the string in the buff is empty (i.e. buff[0] == 0). The pressed button still in depressed state, no char is displayed on the textedit and the uC resets after a while. Again it is not WDT reset. It is enough to have a single char in a buff in order to work properly. Didn't dug into as well.
  3. Yes, I saw that gwinLabelDraw(...) is static. And as a quick workaround I just removed static qualifier. This is a temporary solution only. BTW the new options works fine. Thank you again.
  4. Hi Joel, Thank you. It really makes sense. But what I don't understand is how to use the mew "justify" options. Shall I create custom draw functions like these gwinLabelDrawJustifiedLeft/Right/Center in order to set it?
  5. Don't know if you are asking for text wrapping, but if so first you need to set the key in your configuration file. Then provide proper vertical size of the label widget. Then select desired alignment and you will have multi line label. Recently the uGFX guys implemented vertical text alignment. Check out the latest version. The other option is to embed formatting escape symbols in the text as /n , /t etc. I've tried tab only, but new line shall work as well.
  6. Thank you both guys, Pixmap option sounds very good, but unfortunately I can't use it. As long as I remember it is not available for 'single file' projects. I'm using uGFX in a KDS project.
  7. Thank you inmarket. No, I don't have troubles whit word wrapping. It works fine. But, I'm looking for a way the text to begin from the upper left corner. Thus the text will not be vertically centered in a bigger area. The problem is if I have a bigger area and the text is small. Then it's looks ugly with empty spaces over and under it. I can't shrink the widget size, because then the bigger text will not fit. It is the same as you are writing on a sheet for example. The text begins from the upper left corner (for left-to-right writing style) but not at the middle if sheet, isn't it? The other options is to calculate the given text size at desired font size and to put the proper widget size, but I don't know how I can do it. So, any advices are welcome.
  8. I've fixed this issue and here is how, might be useful for somebody else: The main consideration is the show property while a child container is created. If it's parent is already shown, then the child container show property must be false during it's creation phase, then it can be shown. This way everything works fine.
  9. Hi, Seems that the text in the labels widget is vertically centered in the defined window. Is there any way the text to begin from the top left corner for example? My flag for word wrapping is set to true. And another question - some time it is usable to display text in label widget in different ways, for example vertically, or vertically rotated to -90/+90 degree (top to bottom or bottom to top). is there any way to do that, except custom draw fiction?
  10. Hi guys, I have a page container and inside of it have several children containers, for example ghPageContainer and ghChildContainer1, 2, etc. Each child container contains many elements, but especially ghChildContainer2 contains an ImageButton with properly stacked 3 images enabled/pressed/disabled and an ImageBox. The creation of the child containers are separated in functions as createChildContainerX(), because the child containers layouts and elements depends on an external data and I need to change them. So when the shall be created the code looks like: 1. Create page container 2. createChildContainer1() 3. createChildContainer2(), etc. But when I shall change the child containers contents, then the code looks like: 1. gwinDestroy(ghChildContainerX) 2. createChildContainerX() In the second case (destroy and create) the presentation of both ImageButton and Imagebox are wrong. The ImageButton is allays in enabled state and the image is overlapped with an white square. But if I destroy the overall page (gwinDestroy(ghPageContainer)) and recreate it, then all widgets are presented correct. So, what could be the problem? Shall I do more things after a child container destruction before reconstruct it again?
  11. Thank you Joel, It is my mistake (as usual ), somehow I haven't seen: sliderEvent->position In the slider demo. Sorry, and thank you again for your time.
  12. I'm confused Joel, because inmarket said: So, how to get it if I shall not use gwinSliderGetPosition()? Where is it? Actually I'm using following approach: pe->type == GEVENT_GWIN_SLIDER) { NewValue = gwinSliderGetPosition(ghSlider); } Then I'm using the NewValue to update the numeric value in the Label. Is that approach wrong? Or is there better one? Where I can see a demo where a label or TextEdit are synced with slider?
  13. I see inmarket, but then what you would advice me?
  14. I have label/TextEdit and slider widgets and would like to sync label/TextEdit value with the slider position. Actually I do it, but when slider is on it's final position, i.e. is released, but not during the movement. I tried with the following approach: if((pe->type == GEVENT_GWIN_SLIDER) && ((((GEventGWinSlider *)pe)->type == GSLIDER_EVENT_MOVE) || (((GEventGWinSlider *)pe)->type == GSLIDER_EVENT_SET))){ NewValue = gwinSliderGetPosition(ghSlider); } but it doesn't work. Is it possible to have an auto sync by for example attaching label/TextEdit as listener of slider events or so? The events systems is not so clear for me.
  15. How can I change(replace) the image(run time) of an Image Button widget? Its not about the button states enabled/pressed/disabled, but the complete image. Assuming the new image is already opened in gdispImage imageNew for example. And the same question for Image Box widget? Whether just opening the new image gwinImageOpenFile(ghImageBox, "newImage.gif") is enough?
  16. wctltya

    Display reset

    Thank you both Joel and inmarket, I'll look into later.
  17. wctltya

    Display reset

    With a different display type (an old project) we have experienced display hangs (stop working) during EMC test (shooting it with high voltage). So, in such a case, usually there is an option to detect it and then ... Initially I thought to use gfxInit(). I'm just worrying about the allocated memory. If gfxDeinit() will release all allocated memory?
  18. wctltya

    Blurring a GIF

    Thank you inmarket and Joel. BTW how is going the palette implementation for GIF, is it will be available soon?
  19. wctltya

    Text height

    Thanks Joel. If it was possible to search into the uGFX doc's (http://api.ugfx.io/), perhaps I wouldn't have asked this question.
  20. wctltya

    Blurring a GIF

    Is there a way to blur a gif image? Or is it possible to blur an area/ or window, no matter what is the actually displayed?
  21. wctltya

    Text height

    Is there a way to measure/get the text height? I'm looking for a solution to create/resize a label widget according to the text. I know that it can be calculated (roughly) from it's font size, but in case of word wrapping this will not work.
  22. wctltya

    Display reset

    In special occasions it might be need to reset the display (only), by it's reset pin for example. Then what is the proper way to restore the GUI (uGFX), without resetting the device? Obviously the first step is the display initializing.
  23. Hi, Is there any way to adjust the text (left, center, right) in TextEdit as in Label widget?
×
×
  • Create New...