Tuto WINDEV 25

Part 4: Full application with data 169 ▶ Likewise, create 3 Button controls. • The names of these controls are: "BTN_Previous", "BTN_Next" and "BTN_Last". • These controls are respectively associated with the styles: "BTN_Previous", "BTN_Next" and "BTN_Last". • The WLanguage code corresponding to the "Click" event of "BTN_Previous" is: // If no search is in progress IF HOut(Customer) THEN // Reads the last customer HReadLast(Customer) END // Reads the previous customer HReadPrevious(Customer) // If the beginning of file is exceeded IF HOut(Customer) = True THEN Info("Start of file reached.") ELSE // Displays the customer data FileToScreen() END • The WLanguage code corresponding to the "Click" event of "BTN_Next" is: // If no search is in progress IF HOut(Customer) THEN // Reads the first customer HReadFirst(Customer) END // Reads the next customer HReadNext(Customer) // If the end of file is exceeded IF HOut(Customer) = True THEN Info("End of file reached.") ELSE // Displays the customer data FileToScreen() END • The WLanguage code corresponding to the "Click" event of "BTN_Last" is: // Reads the last customer HReadLast(Customer) IF HOut(Customer) = True THEN // No customer Info("No form to view.") ELSE // Displays the customer data FileToScreen() END

RkJQdWJsaXNoZXIy NDQ0OA==