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

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

Expand Messages
  • Sarmed N.
    Apr 27, 2013
    • 0 Attachment
      Study the following Example BY green

      '---code start
      WindowWidth = 225 :WindowHeight = 230
      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]"
      close #w
      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]
    • Show all 9 messages in this topic