Autor Beitrag
Ironwulf
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 733
Erhaltene Danke: 2



BeitragVerfasst: Mo 17.04.06 17:49 
Hy,
mal wiedern eher kleines problem ;D
ich hab auf ner form eine listbox, einen button und nen DXDraw auf ner scrollbox (funktioniert aber im grunde nur wien scrollbares image)

naja nun das problem ich hab die prozedure form.Keydown
doch irgendwie haben immer der button oder listbox den focus und nicht die form, was dann verhindert das wenn ich nen knopf drück das form.keydown ausgelöst wird, wie bekommt man hin das eben diese beiden komponenten nicht aktiviert sind sondern die form?
thx


Moderiert von user profile iconGausi: Topic aus Delphi Language (Object-Pascal) / CLX verschoben am Fr 21.04.2006 um 08:32
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Mo 17.04.06 17:56 
Form.KeyPreview auf True setzen ;-)

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Ironwulf Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 733
Erhaltene Danke: 2



BeitragVerfasst: Mo 17.04.06 18:07 
öhm fast
wenn ich das so mach verliert beim ersten tastendruck der button seine selection, beim 2.druck erhält sie die listbox und erst beim dritten wird die form.keydown ausgeführt
Ironwulf Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 733
Erhaltene Danke: 2



BeitragVerfasst: Mo 17.04.06 21:23 
so habs jetz
als keypreview auf True
button.Tapstop auf False
und im button.onklick Form1.SetFocusedControl(Form1);

ansonsten fängt der button den tastendruck trotzdem ab und wenn ich keydown auch in den button geschrieben hab gings ah nit