Boa TextCtrl Props

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • true911m
    New Member
    • Dec 2006
    • 92

    #1

    Boa TextCtrl Props

    I can't seem to find the "ReadOnly" attribute for a wx.TextCtrl in Boa. It's usually just a checkbox/boolean in VS; I think wxGlade used a wx value like TE_READONLY or something similar. It's probably right in front of me here somewhere...
  • true911m
    New Member
    • Dec 2006
    • 92

    #2
    I'm also trying to set the window (er, frame in this case, I guess) properties to not have minimize and maximize buttons, but I don't want to use the tool-type of window with a mini title bar, either. (I know, this isn't just about TextCtrls...)

    Comment

    • bartonc
      Recognized Expert Expert
      • Sep 2006
      • 6478

      #3
      It in Inspector:Const r Tab:Syle checkbox pulls down a list; about 2/3 of the way down alphabetical TE_*

      Comment

      • bartonc
        Recognized Expert Expert
        • Sep 2006
        • 6478

        #4
        Originally posted by true911m
        I'm also trying to set the window (er, frame in this case, I guess) properties to not have minimize and maximize buttons, but I don't want to use the tool-type of window with a mini title bar, either. (I know, this isn't just about TextCtrls...)
        Same place: Inspector:Const r:Style.

        Comment

        • true911m
          New Member
          • Dec 2006
          • 92

          #5
          Originally posted by bartonc
          Same place: Inspector:Const r:Style.
          Oh that's what that is. I saw the Style checkbox with a zero and thought, "oh great, more codes to look up." That's much better.

          Alright, next question(s) (you can change this thread to just Boa Props if you like...):

          Can you set up a tab-order for using the interface with a keyboard?

          Can you set the Default property for a button when you press Enter? (And there's another property for setting the default Esc button too, but I forget what it's called.) I found a "wants text input" property, or something to that effect, which I think places the cursor in the textbox when the frame is displayed, but I haven't worked it through yet, and it doesn't have a noticeable effect on the buttons, even though it exists for them as well.

          Last question - more general, what's the distinction between a frame and a window? I don't hear much talk about windows in general in Python.


          The app I'm experimenting with is a rewrite of a little VB app I once created for an employer that used only generated passwords (with multiple algorithms) because they refused to enforce a changing password policy. It's not used now, but I plan to send it to my friend who's the sysadmin there and tell him I wrote it in Python, which he's always liked but never spent much time on. Hopefully it'll give him some motivation. I really like that these widgets (and the app, by extension) have the normal desktop look and feel about them.

          Comment

          • true911m
            New Member
            • Dec 2006
            • 92

            #6
            Originally posted by bartonc
            Same place: Inspector:Const r:Style.
            I found what should be the properties I'm looking for: wx.MAXIMIZE_BOX and wx.MINIMIZE_BOX options in the Inspector:Const r Style options. However, these are False by default, and changing them to True has no effect.

            I thought they might be overridden by the wx.DEFAULT_FRAM E_STYLE option, which is the only one True by default, but turning that off removes the border and title bar from the window/frame completely.

            Still stumped.

            Comment

            • bartonc
              Recognized Expert Expert
              • Sep 2006
              • 6478

              #7
              Originally posted by true911m
              I found what should be the properties I'm looking for: wx.MAXIMIZE_BOX and wx.MINIMIZE_BOX options in the Inspector:Const r Style options. However, these are False by default, and changing them to True has no effect.

              I thought they might be overridden by the wx.DEFAULT_FRAM E_STYLE option, which is the only one True by default, but turning that off removes the border and title bar from the window/frame completely.

              Still stumped.
              I haven't looked at the bit pattern for DEFAULT_FRAME_S TYLE as I write this, but will look into it. I did play with clearing this and setting others to get a frame style that I wanted. It took many itterations of regenerating and going back into designer and I still hadn't achieved a good result (clearly, updating the repr of the frame on the screen is a Boa weakness at this point). I'm sure that it can be done and will continue to play with it. This is important for all to have a handle on. Thanks for pointing it out,
              Barton

              Comment

              • bartonc
                Recognized Expert Expert
                • Sep 2006
                • 6478

                #8
                Originally posted by true911m
                I found what should be the properties I'm looking for: wx.MAXIMIZE_BOX and wx.MINIMIZE_BOX options in the Inspector:Const r Style options. However, these are False by default, and changing them to True has no effect.

                I thought they might be overridden by the wx.DEFAULT_FRAM E_STYLE option, which is the only one True by default, but turning that off removes the border and title bar from the window/frame completely.

                Still stumped.
                I feel like a fool... I already have a window with attrs you are looking for. I use a wx.Dialog. The DEFAULT_FRAME_S TYLE on these guys is just what you are after (although Boa shows these "decoration s", they are not there when it runs - strike 2 for boa).

                Comment

                • true911m
                  New Member
                  • Dec 2006
                  • 92

                  #9
                  Originally posted by bartonc
                  I feel like a fool... I already have a window with attrs you are looking for. I use a wx.Dialog. The DEFAULT_FRAME_S TYLE on these guys is just what you are after (although Boa shows these "decoration s", they are not there when it runs - strike 2 for boa).
                  I don't get you. How do you edit a dialog in designer? It pulls up the entire (blank) frame for the module you're working in, whether it contains a dialog or not.

                  Comment

                  • true911m
                    New Member
                    • Dec 2006
                    • 92

                    #10
                    Originally posted by true911m
                    I don't get you. How do you edit a dialog in designer? It pulls up the entire (blank) frame for the module you're working in, whether it contains a dialog or not.
                    Oh I got it -- there's a blank dialog form.

                    Comment

                    • true911m
                      New Member
                      • Dec 2006
                      • 92

                      #11
                      Originally posted by true911m
                      Oh I got it -- there's a blank dialog form.
                      The dialog worked. The .default property still doesn't behave as anticipated after enabling it (pressing Enter should fire the .default button), but I can type and tab from field to field and on down to the button in question without reaching for the mouse.

                      Comment

                      • bartonc
                        Recognized Expert Expert
                        • Sep 2006
                        • 6478

                        #12
                        Originally posted by true911m
                        The dialog worked. The .default property still doesn't behave as anticipated after enabling it (pressing Enter should fire the .default button), but I can type and tab from field to field and on down to the button in question without reaching for the mouse.
                        Use
                        Code:
                        myDefaultButton.SetDefault()
                        to make that work

                        Comment

                        Working...