Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #13554
| Path | csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | "Karl-Heinz" <invalid@invalid.invalid> |
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: Mofdify Input dropdownlist |
| Date | Thu, 24 Feb 2022 18:55:27 +0100 |
| Lines | 123 |
| Message-ID | <j7pv60F6f0jU1@mid.individual.net> (permalink) |
| References | <bc535ae4-d0a8-44ed-835c-91f5c43faa60n@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; format=flowed; charset="UTF-8"; reply-type=original |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net ZVBYMYUeCvQPXKZKbu0LAwkQZOrlskepyrWjIIv15iIgEUFsQ= |
| Cancel-Lock | sha1:6WOXlF1IZpr/4maJn9mTBVzDpHU= |
| In-Reply-To | <bc535ae4-d0a8-44ed-835c-91f5c43faa60n@googlegroups.com> |
| X-Priority | 3 |
| X-MSMail-Priority | Normal |
| Importance | Normal |
| X-Newsreader | Microsoft Windows Live Mail 16.4.3564.1216 |
| X-MimeOLE | Produced By Microsoft MimeOLE V16.4.3564.1216 |
| Xref | csiph.com comp.lang.clipper.visual-objects:13554 |
Show key headers only | View raw
Hi Jack
some month ago i posted a sleInputTimer class in the X#-Forum. With some
small modifications the code seems to work with a DROPDOWNLIST Combo too. To
see what's going on, i added some console output to the attached
cmbTimerSearch class. Just inherit your comboBox from cmbTimerSearch and
give it a try.
What the CB_SELECTSTRING msg does is described here:
https://docs.microsoft.com/en-us/windows/win32/controls/cb-selectstring
regards
Karl-Heinz
CLASS cmbTimerSearch INHERIT ComboBox
PROTECT _lTimerActive AS LOGIC
PROTECT _nInterval := 400 AS DWORD
PROTECT _cSearch AS STRING
METHOD Destroy() CLASS cmbTimerSearch
SELF:StopTimer()
SUPER:Destroy()
RETURN NIL
METHOD Dispatch ( oEv ) CLASS cmbTimerSearch
LOCAL oEvent AS Event
oEvent := oEv
DO CASE
CASE oEvent:message == WM_CHAR
_cSearch += CHR (oEvent:wParam )
CASE oEvent:message == WM_KEYUP
SELF:StartTimer()
CASE oEvent:message == WM_KEYDOWN
SELF:StopTimer()
CASE oEvent:message == WM_KILLFOCUS
SELF:StopTimer()
CASE oEvent:message == WM_TIMER
IF ! Empty ( _cSearch )
SELF:StopTimer()
? "Search for:" , _cSearch := "R-" + _cSearch
? SendMessage( SELF:Handle() , CB_SELECTSTRING , DWORD (
_CAST , -1 ) , LONG (_CAST, String2Psz ( _cSearch ) ) )
_cSearch := ""
ENDIF
ENDCASE
RETURN SUPER:Dispatch ( oEvent )
METHOD init (oOwner, nID, oPoint, oDimension, kComboType, kStyle ) CLASS
cmbTimerSearch
SUPER:init (oOwner, nID, oPoint, oDimension, kComboType, kStyle )
RETURN SELF
METHOD SetTimerInterval ( n ) CLASS cmbTimerSearch
_nInterval := n
RETURN SELF
METHOD StartTimer() CLASS cmbTimerSearch
IF ! _lTimerActive
IF SetTimer(SELF:Handle(), 4711 , _nInterval , NULL_PTR) == 4711
_lTimerActive := TRUE
ENDIF
ENDIF
RETURN _lTimerActive
METHOD StopTimer() CLASS cmbTimerSearch
IF _lTimerActive
IF KillTimer ( SELF:Handle() , 4711 )
_lTimerActive := FALSE
ENDIF
ENDIF
RETURN ! _lTimerActive
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Mofdify Input dropdownlist Jack Konings <glados.1964@gmail.com> - 2022-02-24 02:40 -0800
Re: Mofdify Input dropdownlist dlzc <dlzc1@cox.net> - 2022-02-24 06:49 -0800
Re: Mofdify Input dropdownlist Jack Konings <glados.1964@gmail.com> - 2022-02-24 07:03 -0800
Re: Mofdify Input dropdownlist dlzc <dlzc1@cox.net> - 2022-02-24 12:20 -0800
Re: Mofdify Input dropdownlist Jack Konings <glados.1964@gmail.com> - 2022-02-25 07:51 -0800
Re: Mofdify Input dropdownlist dlzc <dlzc1@cox.net> - 2022-02-25 10:33 -0800
Re: Mofdify Input dropdownlist JohnMartens <martens@tennishulp.info> - 2022-02-24 15:54 +0100
Re: Mofdify Input dropdownlist Jack Konings <glados.1964@gmail.com> - 2022-02-24 07:07 -0800
Re: Mofdify Input dropdownlist "Karl-Heinz" <invalid@invalid.invalid> - 2022-02-24 18:55 +0100
Re: Mofdify Input dropdownlist Jack Konings <glados.1964@gmail.com> - 2022-02-25 07:49 -0800
csiph-web