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

Re: textbox - Stefan

Expand Messages
  • jonmdon2001
    Stefan, thanks. I figured a way to show the editing box busy by value 0 ,,,,,but I like your way. Muchas gracias. Jon ... info. ... information ...
    Message 1 of 38 , Dec 4, 2008
    • 0 Attachment
      Stefan, thanks. I figured a way to show the editing box busy
      by "value>0",,,,,but I like your way. Muchas gracias.

      Jon


      --- In libertybasic@yahoogroups.com, "Stefan Pendl"
      <pendl2megabit@...> wrote:
      >
      > >
      > > Not sure how to word this question, but will try: I edit listbox
      > > information by clicking it into an textbox used for editing the
      info.
      > > The Info is then placed back into the ListBox from the
      > > textBox. During
      > > the time that information is in the textbox I want to make
      > > sure that no
      > > other information is placed in the textbox, that is, if the
      > > textbox is
      > > being used I want to disable it so that no other information is
      > > accidentally placed into the box,(which would erase the
      information
      > > being edited).
      > >
      > > If this makes sense to anyone then you are more man than
      > > I,(except for
      > > you ladies of course). I shall appreciate all help and
      suggestions.
      > >
      >
      > Check the following.
      >
      > '---code start (watch for line wraps)
      > for i = 1 to 10
      > array$(i) = "Edit me ..."
      > next
      >
      > nomainwin
      >
      > listbox #m.lb, array$(), [edit.item], 10, 10, 140, 200
      > textbox #m.tb, 160, 10, 140, 25
      > button #m.bt, "Update Item", [update.item], ul, 160, 45, 140, 25
      >
      > 'make the button the default, if enter is hit in the textbox
      > stylebits #m.bt, _BS_DEFPUSHBUTTON, 0, 0, 0
      >
      > open "Test" for window as #m
      > #m "trapclose [quit]"
      > #m.bt "!disable"
      > #m.tb "!disable"
      > #m.lb "singleclickselect [display.item]"
      > wait
      >
      > [display.item]
      > 'single click event handler
      > #m.lb "selectionindex? index"
      > #m.tb array$(index)
      > wait
      >
      > [edit.item]
      > 'double click event handler
      > #m.lb "selectionindex? index"
      > #m.lb "disable"
      > #m.bt "!enable"
      > #m.tb "!enable"
      > #m.tb array$(index)
      > wait
      >
      > [update.item]
      > #m.tb "!contents? dummy$"
      > array$(index) = dummy$
      > #m.bt "!disable"
      > #m.tb "!disable"
      > #m.lb "enable"
      > #m.lb "reload"
      > wait
      >
      > [quit]
      > close #m
      > end
      > '---code end
      >
      > ---
      > Stefan Pendl
      >
    • jonmdon2001
      Stefan, thanks. I figured a way to show the editing box busy by value 0 ,,,,,but I like your way. Muchas gracias. Jon ... info. ... information ...
      Message 38 of 38 , Dec 4, 2008
      • 0 Attachment
        Stefan, thanks. I figured a way to show the editing box busy
        by "value>0",,,,,but I like your way. Muchas gracias.

        Jon


        --- In libertybasic@yahoogroups.com, "Stefan Pendl"
        <pendl2megabit@...> wrote:
        >
        > >
        > > Not sure how to word this question, but will try: I edit listbox
        > > information by clicking it into an textbox used for editing the
        info.
        > > The Info is then placed back into the ListBox from the
        > > textBox. During
        > > the time that information is in the textbox I want to make
        > > sure that no
        > > other information is placed in the textbox, that is, if the
        > > textbox is
        > > being used I want to disable it so that no other information is
        > > accidentally placed into the box,(which would erase the
        information
        > > being edited).
        > >
        > > If this makes sense to anyone then you are more man than
        > > I,(except for
        > > you ladies of course). I shall appreciate all help and
        suggestions.
        > >
        >
        > Check the following.
        >
        > '---code start (watch for line wraps)
        > for i = 1 to 10
        > array$(i) = "Edit me ..."
        > next
        >
        > nomainwin
        >
        > listbox #m.lb, array$(), [edit.item], 10, 10, 140, 200
        > textbox #m.tb, 160, 10, 140, 25
        > button #m.bt, "Update Item", [update.item], ul, 160, 45, 140, 25
        >
        > 'make the button the default, if enter is hit in the textbox
        > stylebits #m.bt, _BS_DEFPUSHBUTTON, 0, 0, 0
        >
        > open "Test" for window as #m
        > #m "trapclose [quit]"
        > #m.bt "!disable"
        > #m.tb "!disable"
        > #m.lb "singleclickselect [display.item]"
        > wait
        >
        > [display.item]
        > 'single click event handler
        > #m.lb "selectionindex? index"
        > #m.tb array$(index)
        > wait
        >
        > [edit.item]
        > 'double click event handler
        > #m.lb "selectionindex? index"
        > #m.lb "disable"
        > #m.bt "!enable"
        > #m.tb "!enable"
        > #m.tb array$(index)
        > wait
        >
        > [update.item]
        > #m.tb "!contents? dummy$"
        > array$(index) = dummy$
        > #m.bt "!disable"
        > #m.tb "!disable"
        > #m.lb "enable"
        > #m.lb "reload"
        > wait
        >
        > [quit]
        > close #m
        > end
        > '---code end
        >
        > ---
        > Stefan Pendl
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.