| |
|
|
Erasmus.Herold | Hallöchen ...
following question: I have one Window opened and this find itself countless Edit-boxes. let itself simply (and without each Edit abzufragen) detect, where the Cursor currently blinkt?
fenster_darueber_2% = Create("Dialog",fenster_darueber%,"Fenster",28,330,1870,730)
fenster_fixieren_2& = external("USER32","GetSystemMenu",fenster_darueber_2%,0)
external("USER32","DeleteMenu",fenster_fixieren_2&,$F010,0)
ks_1_cent$ = create("Edit", fenster_darueber_2%, "", 700, 135, 100, 30)
ks_2_cent$ = create("Edit", fenster_darueber_2%, "", 700, 170, 100, 30)
ks_5_cent$ = create("Edit", fenster_darueber_2%, "", 700, 205, 100, 30)
ks_10_cent$ = create("Edit", fenster_darueber_2%, "", 700, 240, 100, 30)
ks_20_cent$ = create("Edit", fenster_darueber_2%, "", 700, 275, 100, 30)
In welchem area blinkt the Cursor? Thank you! |
|
|
| |
|
|
|
H.Brill | The Systemvariable %GetFocus gives you the lever the straight active Editfeldes back. |
|
|
| Benutze XPROFAN X3 + FREEPROFAN Wir sind die XProfaner. Sie werden von uns assimiliert. Widerstand ist zwecklos! Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.
Was die Borg können, können wir schon lange. | 11/20/18 ▲ |
|
|
|
|
Erasmus.Herold | thanks for response. so I had the too in the Help found.
One kurzes example would cool been. therefore I had extra one couple boxes as code enclosed. Perhaps one kurzer Tipp, How I z.B. by the suitable request The Info sustain: the Cursor standing in area "ks_10_cent$"
Thank you |
|
|
| |
|
|
|
H.Brill | 1. ks_1_cent$ is a Stringvariable. to that Happiness konvertiert XProfan intern. therefore comes too no Error. Create() supply but always a handle (number) back. means is it rather, a Zahlenvariable (%,&, lever) To use.
2. at that create the Editfields could you one numeriches aray use. The Variablennamen get You anyhow not To see. One korrespondierendes String-aray could but suitable names provide.
Meinst You about something like ?
Declare Edits%[5], names$[], y%
Namen$[] = "1. Edit", "2. Edit", "3. Edit", "4. Edit", "5. Edit"
Window 800, 600
y% = 10
WhileLoop 0, 4
Edits%[&LOOP] = Create("Edit", %HWnd, "", 10, y%, 120, 25)
Inc y%, 30
EndWhile
While 1
WaitInput
WhileLoop 0, 4
If %GetFocus = Edits%[&LOOP]
Locate 15, 1
Print names$[&LOOP], "hat whom Cursor !"
EndIf
EndWhile
Case %Key = 2 : Break
EndWhile
End
|
|
|
| Benutze XPROFAN X3 + FREEPROFAN Wir sind die XProfaner. Sie werden von uns assimiliert. Widerstand ist zwecklos! Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.
Was die Borg können, können wir schon lange. | 11/21/18 ▲ |
|
|
|
|
E.T. | Have the voriges example time to IndexOf(... rebuilt (only in order to aufzuzeigen, the it so too goes ).
Perhaps. isses Yes so bissel faster ...
Declare Edits%[5], names$[], y%, EditPos%
Window 800, 600
y% = 10
WhileLoop 0, 4
Edits%[&LOOP] = Create("Edit", %HWnd, "", 10, y%, 120, 25)
Inc y%, 30
EndWhile
While 1
EditPos% = IndexOf(Edits%[],%GetFocus)
If EditPos% > -1
Locate 15, 1
Print " "'row delete
Locate 15, 1
Print (EditPos%+1) + ". Edit has whom Cursor !"
Else
Locate 15, 1
Print "Irgend something other has whom Focus !"
EndIf
WaitInput
Case %Key = 2 : Break
EndWhile
End
With the whom expl. names for Edit's (How before described) can here nat. too use |
|
|
| Grüße aus Sachsen... Mario WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte... | 11/21/18 ▲ |
|
|
|
|
Erasmus.Herold | |
|
| |
|
|
|
Erasmus.Herold | Getestet - functions splendid - Thank you! |
|
|
| |
|
|