Loading ...
Sorry, an error occurred while loading the content.

Re: [libertybasic] CRLFs in textboxes FWIW

Expand Messages
  • styskul
    I don t know how to set it (and don t have time to research right now), but there should be a style bit that you can pass to the textbox to allow enter when in
    Message 1 of 9 , Apr 26, 2013
    • 0 Attachment
      I don't know how to set it (and don't have time to research right now), but there should be a style bit that you can pass to the textbox to allow enter when in multiline mode.

      Eric




      ----- Original Message -----
      From: "Harry" <harrybee99@...>
      To: libertybasic@yahoogroups.com
      Sent: Friday, April 26, 2013 10:41:36 AM
      Subject: [libertybasic] CRLFs in textboxes FWIW






      I've been meaning to post this for some time:

      I've been using multiline textboxes for text entry for some utilities I've glommed together, because those can wrap text nicely. The drawback is that, if you want to end a paragraph and begin a new one, the Enter key isn't recognized. Everyone else in the world probably already knows this, but for those who don't, I discovered by accident that Ctrl-Enter works. Not the best solution for things you distribute for others to use, but in the instances I use it, I'm the only user.




      [Non-text portions of this message have been removed]
    • Rod
      For complete control you might research Alyce s API solution http://www.alycesrestaurant.com/texteditorapi.htm
      Message 2 of 9 , Apr 27, 2013
      • 0 Attachment
        For complete control you might research Alyce's API solution

        http://www.alycesrestaurant.com/texteditorapi.htm


        --- In libertybasic@yahoogroups.com, "Harry" <harrybee99@...> wrote:
        >
        > I've been meaning to post this for some time:
        >
        > I've been using multiline textboxes for text entry for some utilities I've glommed together, because those can wrap text nicely. The drawback is that, if you want to end a paragraph and begin a new one, the Enter key isn't recognized. Everyone else in the world probably already knows this, but for those who don't, I discovered by accident that Ctrl-Enter works. Not the best solution for things you distribute for others to use, but in the instances I use it, I'm the only user.
        >
      • Sarmed N.
        Study the following Example BY green ---code start nomainwin WindowWidth = 225 :WindowHeight = 230 UpperLeftX=int((DisplayWidth-WindowWidth)/2)
        Message 3 of 9 , Apr 27, 2013
        • 0 Attachment
          Study the following Example BY green

          '---code start
          nomainwin
          WindowWidth = 225 :WindowHeight = 230
          UpperLeftX=int((DisplayWidth-WindowWidth)/2)
          UpperLeftY=int((DisplayHeight-WindowHeight)/2)
          textbox #w.tbx, 40, 45, 140, 100
          statictext #w.st, "textbox", 40, 30, 50, 15
          button #w.btn, "", DefaultButton, UL, -10, -10
          stylebits #w.btn, _BS_DEFPUSHBUTTON, 0, 0, 0
          open "untitled" for window as #w
          #w, "trapclose [quit.w]"
          wait
          [quit.w]
          close #w
          END
          '-------------------------------------------------------
          sub DefaultButton handle$
          hIN = hWnd(#w.tbx)
          #w.tbx, "!contents? out$":out$=out$+chr$(13)+chr$(10)
          #w.tbx, out$ 'print back into textbox
          pos = len(out$)
          calldll #user32, "SendMessageA",_
          hIN as Ulong, _EM_SETSEL as Long, _
          pos as Long, pos as Long, rsult as Long
          end sub
          '---code end



          ________________________________


          --- In libertybasic@yahoogroups.com, "Harry" <harrybee99@...> wrote:
          >
          > I've been meaning to post this for some time:
          >
          > I've been using multiline textboxes for text entry for some utilities I've glommed together, because those can wrap text nicely. The drawback is that, if you want to end a paragraph and begin a new one, the Enter key isn't recognized. Everyone else in the world probably already knows this, but for those who don't, I discovered by accident that Ctrl-Enter works. Not the best solution for things you distribute for others to use, but in the instances I use it, I'm the only user.
          >




          [Non-text portions of this message have been removed]
        • Harry
          I looked for that, Eric, and didn t find it.
          Message 4 of 9 , Apr 27, 2013
          • 0 Attachment
            I looked for that, Eric, and didn't find it.

            --- In libertybasic@yahoogroups.com, epankoke@... wrote:
            >
            > I don't know how to set it (and don't have time to research right now), but there should be a style bit that you can pass to the textbox to allow enter when in multiline mode.
            >
            > Eric
            >
            >
            >
            >
            > ----- Original Message -----
            > From: "Harry" <harrybee99@...>
            > To: libertybasic@yahoogroups.com
            > Sent: Friday, April 26, 2013 10:41:36 AM
            > Subject: [libertybasic] CRLFs in textboxes FWIW
            >
            >
            >
            >
            >
            >
            > I've been meaning to post this for some time:
            >
            > I've been using multiline textboxes for text entry for some utilities I've glommed together, because those can wrap text nicely. The drawback is that, if you want to end a paragraph and begin a new one, the Enter key isn't recognized. Everyone else in the world probably already knows this, but for those who don't, I discovered by accident that Ctrl-Enter works. Not the best solution for things you distribute for others to use, but in the instances I use it, I'm the only user.
            >
            >
            >
            >
            > [Non-text portions of this message have been removed]
            >
          • Stefan Pendl
            ... See http://lbpe.wikispaces.com/gui#Stylebits ;-) Everything you need to know is at the wikis listed in my signature. -- Stefan Pendl
            Message 5 of 9 , Apr 27, 2013
            • 0 Attachment
              Am 27.04.2013 22:54, schrieb Harry:
              > I looked for that, Eric, and didn't find it.
              >

              See http://lbpe.wikispaces.com/gui#Stylebits ;-)

              Everything you need to know is at the wikis listed in my signature.


              --
              Stefan Pendl
              http://stefanpendl.runbasichosting.com/

              LB 4.04 Pro ... http://www.libertybasic.com/assist.html
              LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

              LB Community Wiki .............. http://basic.wikispaces.com/
              LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
              LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

              Books at http://www.lulu.com/ and http://www.amazon.com/
              Alyce Watson ... APIs for Liberty BASIC
              Carl Gundel .... Beginning Programming with Liberty BASIC

              Windows 7 Home Premium 64-bit SP1
              AMD Turion X2 RM-70 2GHz, 4GB RAM
            • Henrik
              Is it possible to use copy and paste in listbox? If yes any example please! ________________________________ From: Rod To:
              Message 6 of 9 , Apr 28, 2013
              • 0 Attachment
                Is it possible to use copy and paste in listbox? If yes any
                example please!


                ________________________________
                From: Rod <rodbird@...>
                To: libertybasic@yahoogroups.com
                Sent: Saturday, April 27, 2013 9:17 AM
                Subject: [libertybasic] Re: CRLFs in textboxes FWIW



                 

                For complete control you might research Alyce's API solution

                http://www.alycesrestaurant.com/texteditorapi.htm

                --- In libertybasic@yahoogroups.com, "Harry" <harrybee99@...> wrote:
                >
                > I've been meaning to post this for some time:
                >
                > I've been using multiline textboxes for text entry for some utilities I've glommed together, because those can wrap text nicely. The drawback is that, if you want to end a paragraph and begin a new one, the Enter key isn't recognized. Everyone else in the world probably already knows this, but for those who don't, I discovered by accident that Ctrl-Enter works. Not the best solution for things you distribute for others to use, but in the instances I use it, I'm the only user.
                >




                [Non-text portions of this message have been removed]
              • Rod
                A listbox isn t designed for that. You could use the hidden textbox trick to receive the list and update the listbox array but it is a pretty convoluted way to
                Message 7 of 9 , Apr 28, 2013
                • 0 Attachment
                  A listbox isn't designed for that. You could use the hidden textbox trick to receive the list and update the listbox array but it is a pretty convoluted way to populate a list. Perhaps if you described the task and gave sample data folks might offer alternative solutions.

                  --- In libertybasic@yahoogroups.com, Henrik <henriknilson@...> wrote:
                  >
                  > Is it possible to use copy and paste in listbox? If yes any
                  > example please!
                  >
                  >
                  > ________________________________
                  > From: Rod <rodbird@...>
                  > To: libertybasic@yahoogroups.com
                  > Sent: Saturday, April 27, 2013 9:17 AM
                  > Subject: [libertybasic] Re: CRLFs in textboxes FWIW
                  >
                  >
                  >
                  >  
                  >
                  > For complete control you might research Alyce's API solution
                  >
                  > http://www.alycesrestaurant.com/texteditorapi.htm
                  >
                  > --- In libertybasic@yahoogroups.com, "Harry" <harrybee99@> wrote:
                  > >
                  > > I've been meaning to post this for some time:
                  > >
                  > > I've been using multiline textboxes for text entry for some utilities I've glommed together, because those can wrap text nicely. The drawback is that, if you want to end a paragraph and begin a new one, the Enter key isn't recognized. Everyone else in the world probably already knows this, but for those who don't, I discovered by accident that Ctrl-Enter works. Not the best solution for things you distribute for others to use, but in the instances I use it, I'm the only user.
                  > >
                  >
                  >
                  >
                  >
                  > [Non-text portions of this message have been removed]
                  >
                • Henrik
                  The following is a code mentioned in the link given by Stefan, but for textbox written by Janet Terra . The content of textbox of the code accept copy and
                  Message 8 of 9 , Apr 28, 2013
                  • 0 Attachment
                    The following is a code
                    mentioned in the link given by Stefan, but for textbox "written by Janet
                    Terra ".
                    The content
                    of textbox of the code accept copy and paste..
                    Is it possible to
                    replace the textbox with listbox with keeping acceptance of copy and paste?
                     
                       'The code


                        Nomainwin
                        WindowWidth=200
                        WindowHeight=160

                        text1$ = "STYLEBITS allows you to change the style of a Liberty BASIC window or control."
                        text2$ = "Add to or edit this text."

                        Textbox #Main.txtbx, 0, 0, 190, 68
                        Stylebits #Main.txtbx, _WS_VSCROLL OR _ES_MULTILINE, _ES_AUTOHSCROLL, 0, 0
                        Statictext #Main, text2$, 5, 80, 190, 30

                        Open "LineWrap for LB" for Window_nf as #Main
                        Print #Main, "Trapclose EndDemo"
                        Print #Main, "Font Times_New_Roman 12 Bold"
                        Print #Main.txtbx, text1$
                        Wait

                        Sub EndDemo handle$
                        Close #Main
                        End
                        End Sub

                     


                    ________________________________
                    From: Rod <rodbird@...>
                    To: libertybasic@yahoogroups.com
                    Sent: Sunday, April 28, 2013 12:04 PM
                    Subject: [libertybasic] Re: CRLFs in textboxes FWIW



                     
                    A listbox isn't designed for that. You could use the hidden textbox trick to receive the list and update the listbox array but it is a pretty convoluted way to populate a list. Perhaps if you described the task and gave sample data folks might offer alternative solutions.

                    --- In libertybasic@yahoogroups.com, Henrik <henriknilson@...> wrote:
                    >
                    > Is it possible to use copy and paste in listbox? If yes any
                    > example please!
                    >
                    >
                    > ________________________________
                    > From: Rod <rodbird@...>
                    > To: libertybasic@yahoogroups.com
                    > Sent: Saturday, April 27, 2013 9:17 AM
                    > Subject: [libertybasic] Re: CRLFs in textboxes FWIW
                    >
                    >
                    >
                    >  
                    >
                    > For complete control you might research Alyce's API solution
                    >
                    > http://www.alycesrestaurant.com/texteditorapi.htm
                    >
                    > --- In libertybasic@yahoogroups.com, "Harry" <harrybee99@> wrote:
                    > >
                    > > I've been meaning to post this for some time:
                    > >
                    > > I've been using multiline textboxes for text entry for some utilities I've glommed together, because those can wrap text nicely. The drawback is that, if you want to end a paragraph and begin a new one, the Enter key isn't recognized. Everyone else in the world probably already knows this, but for those who don't, I discovered by accident that Ctrl-Enter works. Not the best solution for things you distribute for others to use, but in the instances I use it, I'm the only user.
                    > >
                    >
                    >
                    >
                    >
                    > [Non-text portions of this message have been removed]
                    >




                    [Non-text portions of this message have been removed]
                  Your message has been successfully submitted and would be delivered to recipients shortly.