TextCtrl style

  • Rommi

    Rommi - 2008-09-10

    I need a password entry box. So I try to use TextCtrl with wxTE_PASSWORD flag but it doesn't work. I create object like that:

    sizer.Add(passwordCtrl = new TextCtrl(this, "",
                wxDefaultPosition, Size(100, -1),

    But it creates a typical entry box with no asterisks masking. I have tryed setting wxTE_READONLY and wxTE_RIGHT. They also do not work. My system is Ubuntu.

    • Anders F Björklund

      The above code seems to be missing the "id" parameter ?


      • Rommi

        Rommi - 2008-09-25

        Thanx! I have added -1 and it works now. But what does the constructor without this parameter do? I mean constructor which sends Window.UniqueID instead of -1. It seem not to work.

        • Anders F Björklund

          I think it just sent the params in the wrong order or something :-P

          You can use wxID_ANY instead of -1, if you dislike magic values...


Log in to post a comment.