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

Re: [libertybasic] Re: code needed

Expand Messages
  • Fritz Oppliger
    On Wed, 24 Jul 2013 18:39:25 -0700, paradisejb ... editor and readonly are mutually exclusive in my book.
    Message 1 of 8 , Jul 24, 2013
      On Wed, 24 Jul 2013 18:39:25 -0700, paradisejb <jburman1860@...>
      wrote:

      >
      >
      > Sounds like you want a texteditor that is READONLY. You can't do that
      > with the native texteditor LB provides.

      "editor" and "readonly" are mutually exclusive in my book.
    • green8819
      Mutually exclusive means, both won t go together. In other words: * A TXE cannot have Readonly. (TXE=texteditor) * A control marked as Readonly cannot be a
      Message 2 of 8 , Jul 25, 2013
        "Mutually exclusive" means, both won't go together. In other words:
        * A TXE cannot have Readonly. (TXE=texteditor)
        * A control marked as Readonly cannot be a TXE.

        Am I right?

        Is that why:
        * A Windows TXE comes with EDIT. Users can use backspace, etc
        * A TXE that is made Readonly is not a Windows TXE. (eg: the API TXE)

        The TXE made with API has an advantage: It can wrap, using the NO AUTOHSCROLL Stylebits.
        Unfortunately, it does not have 'Find/Replace'.
        In my book, a TXE and Find/Replace should be mutually inclusive.

        --- In libertybasic@yahoogroups.com, "Fritz Oppliger" <fritz@...> wrote:
        >
        >
        > On Wed, 24 Jul 2013 18:39:25 -0700, paradisejb <jburman1860@...>
        > wrote:
        >
        > >
        > >
        > > Sounds like you want a texteditor that is READONLY. You can't do that
        > > with the native texteditor LB provides.
        >
        > "editor" and "readonly" are mutually exclusive in my book.
        >
      • paradisejb
        ... Well, then, what you really want is a NON-DESTRUCTIVE backspace. But what will prevent your user from deleting characters from the cursor position forward
        Message 3 of 8 , Jul 25, 2013
          --- In libertybasic@yahoogroups.com, "Fritz Oppliger" <fritz@...> wrote:
          >
          > "editor" and "readonly" are mutually exclusive in my book.
          >

          Well, then, what you really want is a NON-DESTRUCTIVE backspace. But what will prevent your user from deleting characters from the cursor position forward using the DELETE key? There, apparently, is more to the story than has to this point been revealed.

          Here in the US, you'll often hear a commentator state: "You're entitled to your own opinion, but not to your own facts". The fact is, if you are going to display text in a text editor, a function of that editor is to delete text.

          Since there are many ways the text can be altered if you are going to display it in a text editor, maybe what you want to consider is a way to prevent the modified file from overwriting the original?

          Jack
        • Larry Lowe
          Not sure if this helps but in my personal document writer I used a project file with certain document settings. It loads in the project file which in turn
          Message 4 of 8 , Aug 4, 2013
            Not sure if this helps but in my personal document writer I used a project file with certain document settings. It loads in the project file which in turn tells the program what document to load and whether or not it is read only. Previous versions had no menu only buttons so I made it to disable the save buttons if the file was read only. This way the program will not save the document.


            Larry

            --- In libertybasic@yahoogroups.com, "green8819" <skynetmike@...> wrote:
            >
            > "Mutually exclusive" means, both won't go together. In other words:
            > * A TXE cannot have Readonly. (TXE=texteditor)
            > * A control marked as Readonly cannot be a TXE.
            >
            > Am I right?
            >
            > Is that why:
            > * A Windows TXE comes with EDIT. Users can use backspace, etc
            > * A TXE that is made Readonly is not a Windows TXE. (eg: the API TXE)
            >
            > The TXE made with API has an advantage: It can wrap, using the NO AUTOHSCROLL Stylebits.
            > Unfortunately, it does not have 'Find/Replace'.
            > In my book, a TXE and Find/Replace should be mutually inclusive.
            >
            > --- In libertybasic@yahoogroups.com, "Fritz Oppliger" <fritz@> wrote:
            > >
            > >
            > > On Wed, 24 Jul 2013 18:39:25 -0700, paradisejb <jburman1860@>
            > > wrote:
            > >
            > > >
            > > >
            > > > Sounds like you want a texteditor that is READONLY. You can't do that
            > > > with the native texteditor LB provides.
            > >
            > > "editor" and "readonly" are mutually exclusive in my book.
            > >
            >
          • Glen McInnis
            Hey Larry, It s Glen Check out my website www.runrightsoftware.com and download my brand new program Memorization Professional. It has been posted now on
            Message 5 of 8 , Aug 4, 2013
              Hey Larry, It's Glen

              Check out my website www.runrightsoftware.com and download my brand new
              program "Memorization Professional." It has been posted now on over 70
              freeware sites and I'm currently notifying many churches about it.

              Glen


              On Sun, Aug 4, 2013 at 1:02 PM, Larry Lowe <larryrl@...> wrote:

              > **
              >
              >
              > Not sure if this helps but in my personal document writer I used a project
              > file with certain document settings. It loads in the project file which in
              > turn tells the program what document to load and whether or not it is read
              > only. Previous versions had no menu only buttons so I made it to disable
              > the save buttons if the file was read only. This way the program will not
              > save the document.
              >
              > Larry
              >
              >
              > --- In libertybasic@yahoogroups.com, "green8819" <skynetmike@...> wrote:
              > >
              > > "Mutually exclusive" means, both won't go together. In other words:
              > > * A TXE cannot have Readonly. (TXE=texteditor)
              > > * A control marked as Readonly cannot be a TXE.
              > >
              > > Am I right?
              > >
              > > Is that why:
              > > * A Windows TXE comes with EDIT. Users can use backspace, etc
              > > * A TXE that is made Readonly is not a Windows TXE. (eg: the API TXE)
              > >
              > > The TXE made with API has an advantage: It can wrap, using the NO
              > AUTOHSCROLL Stylebits.
              > > Unfortunately, it does not have 'Find/Replace'.
              > > In my book, a TXE and Find/Replace should be mutually inclusive.
              > >
              > > --- In libertybasic@yahoogroups.com, "Fritz Oppliger" <fritz@> wrote:
              > > >
              > > >
              > > > On Wed, 24 Jul 2013 18:39:25 -0700, paradisejb <jburman1860@>
              > > > wrote:
              > > >
              > > > >
              > > > >
              > > > > Sounds like you want a texteditor that is READONLY. You can't do
              > that
              > > > > with the native texteditor LB provides.
              > > >
              > > > "editor" and "readonly" are mutually exclusive in my book.
              > > >
              > >
              >
              >
              >


              [Non-text portions of this message have been removed]
            • green8819
              For answer to a general question, please ask all. That way, you will get more responses. If something about my post or program, you can ask me or all. I don t
              Message 6 of 8 , Aug 4, 2013
                For answer to a general question, please ask all. That way, you will get more responses.
                If something about my post or program, you can ask me or all.

                I don't know APIs. I use ready-made APIs when I have no choice. Some APIs are powerful and useful.

                Like you, I stayed away from Menu in my early days with LB. Actually, they are as easy as Buttons.
                Buttons and Menus provide the same service: branching and carrying out a specific task.
                Buttons are always displayed in the window, and provide quick access to features. But if too many, they clutter the window.
                Menus and sub-menus are available only when clicked, so the window looks neater.

                You can read about Menu in the LB Help. See "GUI Programming > Controls - Menus, Buttons, Etc"

                Here's a small demo that I just wrote to teach myself "Menu". This demo has to run from a folder; it will write a small file called "xyz.txt" in the folder.

                '----code start
                nomainwin
                WindowWidth = 200 :WindowHeight = 250
                UpperLeftX=10 'int((DisplayWidth-WindowWidth)/2)
                UpperLeftY=10 'int((DisplayHeight-WindowHeight)/2)

                menu #w, "Document", "Settings", [ask], "Save", [save]
                statictext #w.st1, "Settings?", 50, 30, 70, 20
                textbox #w.tbx, 50, 50, 100, 25
                button #w.btn, "Settings", [ask], UL, 60, 100
                button #w.btn, "Save", [save], UL, 75, 140
                statictext #w.st2, "", 80, 170, 70, 20

                open "Branching" for window_nf as #w
                #w, "font arial 10" :#w, "trapclose [quit]"
                #w.st1 "!hide"
                wait

                [ask]
                #w.st1 "!show"
                #w.tbx "!setfocus"
                wait

                [save]
                #w.tbx, "!contents? settings$"
                open DefaultDir$ + "\xyz.txt" for append as #1
                close #1
                open "xyz.txt" for output as #1
                #1 settings$
                close #1
                #w.st2 "Saved"
                calldll #kernel32,"Sleep",2000 as ulong,r as void
                #w.st2 "" :#w.tbx "" :#w.st1 "!hide"
                wait

                [quit]
                close #w
                END
                '----code end


                --- In libertybasic@yahoogroups.com, "Larry Lowe" <larryrl@...> wrote:
                >
                > Not sure if this helps but in my personal document writer I used a project file with certain document settings. It loads in the project file which in turn tells the program what document to load and whether or not it is read only. Previous versions had no menu only buttons so I made it to disable the save buttons if the file was read only. This way the program will not save the document.
                >
                >
                > Larry
                >
                > --- In libertybasic@yahoogroups.com, "green8819" <skynetmike@> wrote:
                > >
                > > "Mutually exclusive" means, both won't go together. In other words:
                > > * A TXE cannot have Readonly. (TXE=texteditor)
                > > * A control marked as Readonly cannot be a TXE.
                > >
                > > Am I right?
                > >
                > > Is that why:
                > > * A Windows TXE comes with EDIT. Users can use backspace, etc
                > > * A TXE that is made Readonly is not a Windows TXE. (eg: the API TXE)
                > >
                > > The TXE made with API has an advantage: It can wrap, using the NO AUTOHSCROLL Stylebits.
                > > Unfortunately, it does not have 'Find/Replace'.
                > > In my book, a TXE and Find/Replace should be mutually inclusive.
                > >
                > > --- In libertybasic@yahoogroups.com, "Fritz Oppliger" <fritz@> wrote:
                > > >
                > > >
                > > > On Wed, 24 Jul 2013 18:39:25 -0700, paradisejb <jburman1860@>
                > > > wrote:
                > > >
                > > > >
                > > > >
                > > > > Sounds like you want a texteditor that is READONLY. You can't do that
                > > > > with the native texteditor LB provides.
                > > >
                > > > "editor" and "readonly" are mutually exclusive in my book.
                > > >
                > >
                >
              Your message has been successfully submitted and would be delivered to recipients shortly.