Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #13702 > unrolled thread
| Started by | David Linda <dlinda2011@gmail.com> |
|---|---|
| First post | 2022-12-12 08:18 -0800 |
| Last post | 2022-12-22 18:04 -0500 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
An SLE that does numbers only? David Linda <dlinda2011@gmail.com> - 2022-12-12 08:18 -0800
Re: An SLE that does numbers only? JohnMartens <martens@tennishulp.info> - 2022-12-12 18:32 +0100
Re: An SLE that does numbers only? Jamal <nospam@example.com> - 2022-12-22 18:04 -0500
| From | David Linda <dlinda2011@gmail.com> |
|---|---|
| Date | 2022-12-12 08:18 -0800 |
| Subject | An SLE that does numbers only? |
| Message-ID | <cc2f61f1-3464-4329-9547-2fcb58e6d80dn@googlegroups.com> |
I found the code below: CLASS mySLE INHERIT SingleLineEdit //Creata a class inherit SingleLineEdit METHOD init(oOwner, nResourceID) CLASS mySLE // Init the Class SUPER:init(oOwner, nResourceID) RETURN SELF METHOD Dispatch(oEvent) CLASS mySLE IF oEvent:Message == WM_GETDLGCODE IF SELF:NameSym == #SymName // of your SLE IF oEvent:wParam == KEYENTER // or any key you want SELF:Owner:myMethod() //execute your method RETURN 0L ENDIF ENDIF ENDIF RETURN SUPER:Dispatch(oEvent) But the dispatch method never gets called...I am thinking that I need to create a mysle object in the datawindow activate method. Is that right? David
[toc] | [next] | [standalone]
| From | JohnMartens <martens@tennishulp.info> |
|---|---|
| Date | 2022-12-12 18:32 +0100 |
| Message-ID | <tn7oj7$293ls$1@dont-email.me> |
| In reply to | #13702 |
Hi David, Why not put a picture clause (like 9999) on the SLE ? John Op 12-12-2022 om 17:18 schreef David Linda: > I found the code below: > > CLASS mySLE INHERIT SingleLineEdit //Creata a class inherit SingleLineEdit > > METHOD init(oOwner, nResourceID) CLASS mySLE // Init the Class > SUPER:init(oOwner, nResourceID) > RETURN SELF > > METHOD Dispatch(oEvent) CLASS mySLE > > IF oEvent:Message == WM_GETDLGCODE > > IF SELF:NameSym == #SymName // of your SLE > > IF oEvent:wParam == KEYENTER // or any key you want > > SELF:Owner:myMethod() //execute your method > RETURN 0L > ENDIF > > ENDIF > > ENDIF > > RETURN SUPER:Dispatch(oEvent) > > But the dispatch method never gets called...I am thinking that I need to create a mysle object in the datawindow activate method. Is that right? > > David
[toc] | [prev] | [next] | [standalone]
| From | Jamal <nospam@example.com> |
|---|---|
| Date | 2022-12-22 18:04 -0500 |
| Message-ID | <to2npb$1hdl$1@gioia.aioe.org> |
| In reply to | #13702 |
You need to drop an SLE control on the Window, then change the Inherit From property to the subclass mySLE. Forget about the Activate method. Jamal On 12/12/2022 11:18 AM, David Linda wrote: > I found the code below: > > CLASS mySLE INHERIT SingleLineEdit //Creata a class inherit SingleLineEdit > > METHOD init(oOwner, nResourceID) CLASS mySLE // Init the Class > SUPER:init(oOwner, nResourceID) > RETURN SELF > > METHOD Dispatch(oEvent) CLASS mySLE > > IF oEvent:Message == WM_GETDLGCODE > > IF SELF:NameSym == #SymName // of your SLE > > IF oEvent:wParam == KEYENTER // or any key you want > > SELF:Owner:myMethod() //execute your method > RETURN 0L > ENDIF > > ENDIF > > ENDIF > > RETURN SUPER:Dispatch(oEvent) > > But the dispatch method never gets called...I am thinking that I need to create a mysle object in the datawindow activate method. Is that right? > > David
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web