May 18, 2024, 02:42:53 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Message box won't reset

Started by TexasPete, January 06, 2009, 06:00:13 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TexasPete

I am becoming familiar withe the control Id . I have created a simple list box display the current directory. I select from the list and I am displaying what
I select using a simple message box. The message box displays what I select. Every thing seems to be going fine. I chose to select another Item and the
Message box displays my previous selecttion. I set my strings and varaiables to zero and the sting to nothing, but the message box displays the old selection.
Any Body know what I am doing wrong. The Code is below.

CASE LISTBOX_1
          FILENUMBER=0 
          FolderSelected=""
          FILENUMBER=GETSELECTED MAIN_WINDOW,LISTBOX_1
         FolderSelected=GETSTRING (MAIN_WINDOW,LISTBOX_1,FILENUMBER)
      If (FILENUMBER >-1)
                       '------------WINDOW NAME,message to appear, addtional texxt, type of box
          MESSAGEBOX MAIN_WINDOW,FolderSelected,"Error",@MB_OK
       ' This works the first time around
       End if
'----------------Below is the cancel button which works just fine-------------------

      CASE CancelBUTTON_5



Any body see my error?

Thanks
Texas Pete

aurelCB

Try after Messagebox command set to zero.

IF (FILENUMBER >-1)
                       '------------WINDOW NAME,message to appear, addtional texxt, type of box
       MESSAGEBOX MAIN_WINDOW,FolderSelected,"Error",@MB_OK
       FILENUMBER=0
        FolderSelected=""
       ' This works the first time around
       ENDIF

Ionic Wind Support Team

read the user guide section "Using listbox controls"

You have to test for the notification code.  Specifically @LBNSELCHANGE

Ionic Wind Support Team