Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
2
Erster Beitrag:
vor 2 Monaten, 1 Woche
Letzter Beitrag:
vor 2 Monaten, 1 Woche
Beteiligte Autoren:
GuenterP

TableInputSearch - closing the input field

Startbeitrag von GuenterP am 10.09.2017 11:08

Hi,

has any of you a working solution to close the input field after it has lost focus?

Unfortunately, it's not the same "FOCUS lost" as of the Table itself. I simply believe that they either forgot to automatically close the search field on 'focus lost' (= cursor went somewhere else) or forgot to provide a Table-function for closing that field.
[attachment 2437 Ashampoo_Snap_2017.09.10_17h15m04s_003_.png]

Antworten:

Hi, to close the Edit Control in the Column's Header took me a day of fiddling around.

The desired mechanism mimics the sequence of keystrokes of another program:

The user wants to search for a certain customer by customer number and switch to display said customer on screen ..

1 - user inputs a non-numeric code (e.g. "K") in the Edit Control below. Essential part of the code:

TableSort(MyTable,"CustomerNumber") // searching needs the appropriate sort sequence
TableInputSearch(MyTable.CustomerNumber,searchDefault) // open the Search Edit Control
ReturnToCapture(MyTable.CustomerNumber) // put cursor into the Search Edit Control (maybe, that's a bug or a feature, who knows?)

This will open the Edit Control in the Header of table column "Customer Number" and make it ready for input.

2 - Now, the user is able to either directly input a desired customer number and/or scroll up/down by using the arrow-up and arrow-down. Whenever the selection bar is over the desired customer, the user will hit the RETURN key. The idea is to a) display the customer's address etc. and b) to close the Search Edit Control and c) to return to the Edit Control below.

Since the Search Edit Control doesn't simply close when leaving MyTable, we have to simulate a click of the selection bar over the selected customer in MyTable.

*** SORRY - this "solution" doesn't work in all cases - WITHDRAWN ***

von GuenterP - am 11.09.2017 06:06
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.