Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

buzzdx

Members
  • Content Count

    28
  • Joined

  • Last visited

Community Reputation

7 Neutral
  1. Well, to be honest I never had this problem before and have been working with std::string like .. forever basically. I'm not sure what you mean by funny chars. If you mean ä, ü, ö etc., it usually works just fine in my other applications which use wxWidgets for UI and also databases like SQLite or MySQL. If you mean like smileys or something, then yeah, std::string can't use that. Anyway, problem solved, thanks 😃 While writing this I read the post you linked xD Nicely written ^^
  2. So I got it working now. The problem was indeed that I was using std::string to work on the field data. Simply converting it by creating a new WString from the string then did not work either. The solution is to just use wstring and not string to get and modify the data and finally update the data in the textfield. If you, for some reason, have to use string somewhere in the code and need to convert it to wstring you can use this code: std::wstring S2WS(const std::string& s) { int len; int slength = (int)s.length() + 1; len = MultiByteToWideChar(CP_ACP, 0, s.c_str(), slength, 0,
  3. So the problem is I'm not using the right char set? In my application the user enters something into a textbox. Then it gets stored into a string, gets modified and put back into the textfield, which is where the exception is thrown. Do I need to use wstring instead of string, or your WString class? I tried to convert the modified sting variable to your WString type like: txt->SetText(Wstring(stringvar)); but that didn't work either.
  4. Hi, I just tried to use the SetText method on a textfield with a value containing "ä". This results in an exception being thrown: std::range_error. The following code reproduces the error: auto txttarget = CreateTextField(515, 5, 400, 24, detailpanel); txttarget->SetText("ä"); It's the same for ö and ü. Am I doing something wrong or is this a bug?
  5. Yeah it's like a very niche thing, if it will ever be used at all. But since I was reporting the things I encountered I just wanted to share this too.
  6. I wasn't aware that the key is named differently on US keyboard layouts, sry for the confusion. Thanks for clarifying klepto2.
  7. So this one is a bit hard to explain. By mystake I created a button which was partly below another widget created after the button. So half the button is visible, but the lower part is hidden behind a tree view. When I click on the button (press and let go) and then move the mouse down, leaving the button by entering the area of the tree control, the button does not notice it lost focus and will keep the blue border. It will notice only when I click on something else in the window. The following setup should illustrate and recreate the "problem". I'm not sure if it can be called a bug though,
  8. In the create slider function documentation it says the slider has a defined range. I could not find a function in the documentation that does that. I found the SetRange() function which seems to be doing that, but I'm not sure why it takes an x and y value for a one dimensional slider. Could you please clarify how to set the range of a slider and add it to the docs? Thanks,
  9. When working with textfields I noticed that they do not react to SHIFT+POS1 and SHIFT+END commands. Is it possible to add these to textfields in an update? Thanks,
  10. In my project I created a button to delete items. When the button is pressed and the item gets deleted the button will be turned off/disabled. Since the mouse is still over the button when it gets disabled, the button will then keep its blue border even when the mouse moves out of it afterwards. So it seems like it's not detecting the loss of focus while being disabled. However, it will lose the stuck border as soon as I click on anything else in the window. I tried this to overcome the problem: // first try to fix it btn->SetState(false); btn->Redraw(); // trying to emit
  11. Alright, will do tomorrow. Bed is calling ^^ Good night!
  12. I'll try to do that, sure. For the one with the button border we had already talked about a few weeks ago too, or just the new ones?
  13. Hi again, I'm currently facing a problem which is linked to the last one. Right now I have a button, and upon pressing the button it needs to get disabled. This time the mouse is still on the button at the time it gets disabled and thus again keeps the blue border. I think this should be fixed when you put in that fake mouse-leave event to button->disable(). However, is there a way to make this work as of now? I tried this: // first try to fix it btn->SetState(false); btn->Redraw(); // trying to emit the mouseleave, but I think it can't get handled before the next line of co
  14. Hi there, I've discovered another small thing I wanted to let you know about and maybe there is a way to fix this. So I have several buttons which get enabled and disabled depending on what type of item is selected in my treeview. One button is for adding files. In the event handler of that button I call the RequestFile() function which opens the popup dialog. After a file has been selected the dialog closes and the new item is added to my data structure. The tree then rebuilts itself to reflect the changes and call the function to enable/disable buttons. At this time, sometimes the add f
×
×
  • Create New...