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

46371Re: [libertybasic] Re: CRLFs in textboxes FWIW

Expand Messages
  • Henrik
    Apr 28, 2013
      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]
    • Show all 9 messages in this topic