Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Focus weitergeben (https://www.delphipraxis.net/27111-focus-weitergeben.html)

LoL 4. Aug 2004 12:21


Focus weitergeben
 
hallo zusammen

ich habe in meinem programm meherer edit felder. den focus gebe ich folgendermaßen weiter:
Delphi-Quellcode:
PostMessage( Handle, WM_NextDlgCtl, 0, 0 ); {Win32 API}
ich habe außer den editfelder auch noch ein paar andere buttons. diese haben die eigenschaft "tabstop=false". trotzdem erhalten sie einen focus. woran kann das liegen?

Blutiger Anfänger 21. Aug 2004 23:57

Re: Focus weitergeben
 
Zitat:

WS_TABSTOP
Specifies a control that can receive the keyboard focus when the user presses the TAB key. Pressing the TAB key changes the keyboard focus to the next control with the WS_TABSTOP style.
You can turn this style on and off to change dialog box navigation. To change this style after a window has been created, use SetWindowLong.
Zitat:

The WM_NEXTDLGCTL message is sent to a dialog box procedure to set the keyboard focus to a different control in the dialog box.

Syntax

WM_NEXTDLGCTL

WPARAM wParam
LPARAM lParam;

Parameters

wParam
If lParam is TRUE, this parameter identifies the control that receives the focus. If lParam is FALSE, this parameter indicates whether the next or previous control with the WS_TABSTOP style receives the focus. If wParam is zero, the next control receives the focus; otherwise, the previous control with the WS_TABSTOP style receives the focus.
lParam
The low-order word indicates how the system uses wParam. If the low-order word is TRUE, wParam is a handle associated with the control that receives the focus; otherwise, wParam is a flag that indicates whether the next or previous control with the WS_TABSTOP style receives the focus.
Entsprechend dürfte der Stil nicht korrekt gesetzt sein, da die Win32-API das korrekt handelt. Ich weiß nicht inwieweit die Eigenschaft von Delphi und API zusammenhängen (ein Zusammenhang ist zu vermuten) aber bei meinen Tests funktioniert es. Versuch mal explizites Setzen des obigen Stils.


Alle Zeitangaben in WEZ +1. Es ist jetzt 19:15 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz