ERLEDIGT
NEIN
NEIN
ANTWORTEN
1
1
ZUGRIFFE
1474
1474
EMPFEHLEN
-
Hallo Leute,
ich habe ein kleines Problem. Ich schreibe für ein Blinden ein Programm. Dort mussen die ersten 3 Elemente der Combobox -->ComboBox1.Style:=csOwnerDrawFixed sein damit Virgo(BlindenSoftware) die Combobox als Aufklappliste sieht. Das 4 Element soll aber wiederrum zu ein Eingabefeld werden --> ComboBox1.Style:=csDropDown;
Mein Problem ist nun das wenn jemand ins 4 Element geht der Focus verschwindet und der Blinde nichts ändern kann im 4 Element der Combobox.
Code :1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) ComboBox1: TComboBox; procedure FormCreate(Sender: TObject); procedure ComboBox1KeyPress(Sender: TObject; var Key: Char); procedure ComboBox1Select(Sender: TObject); private { Private-Deklarationen } public { Public-Deklarationen } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.FormCreate(Sender: TObject); begin ComboBox1.Text:='Standartwert'; ComboBox1.items.add('nein'); ComboBox1.items.add('Durch alleinstehendes Semikolon'); ComboBox1.items.add('Durch Originalseitenangabe'); ComboBox1.items.add('...'); ComboBox1.ItemIndex:=0; end; procedure TForm1.ComboBox1KeyPress(Sender: TObject; var Key: Char); begin if (Combobox1.ItemIndex=0)OR(Combobox1.ItemIndex=1)OR(Combobox1.ItemIndex=2) then begin if not (Key in[#26]) then begin Key := #0; Windows.Beep(500, 100); Windows.Beep(400, 100); Windows.Beep(300, 100); //Windows.Beep(200, 100); //Windows.Beep(100, 100); end end end; procedure TForm1.ComboBox1Select(Sender: TObject); begin if (Combobox1.ItemIndex=0)OR(Combobox1.ItemIndex=1)OR(Combobox1.ItemIndex=2) then ComboBox1.Style:=csOwnerDrawFixed else begin ComboBox1.Style:=csDropDown; ComboBox1.Focused; ComboBox1.ItemIndex:=3; ComboBox1.SetFocus; //ComboBox1.Refresh //ComboBox1.ItemIndex:=3; end end; end.
Ich hoffe es kann mir einer bei mein Problem helfen
mfg
RobertIch denke, also bin ich.
-
Wenn es wirklich nur am Focus liegt, kannst du den ja über ActiveControl setzen. (Hilfedateien lesen!)
-Gawayn
Ähnliche Themen
-
Focus neu setzen nach aktiviertem Element
Von Funj0y im Forum Javascript & AjaxAntworten: 12Letzter Beitrag: 31.05.10, 13:38 -
Das DataGridView-Element ist kein bekanntes Element
Von Vereth im Forum .NET Windows FormsAntworten: 0Letzter Beitrag: 25.11.09, 17:52 -
<div>-Element einen Focus geben
Von Geflügel im Forum Javascript & AjaxAntworten: 4Letzter Beitrag: 01.09.07, 11:03 -
Welches Element hat den Focus?
Von Rudi100 im Forum VisualStudio & MFCAntworten: 3Letzter Beitrag: 05.10.05, 18:54 -
Combobox focus setzen
Von Dirkk im Forum Visual Basic 6.0Antworten: 4Letzter Beitrag: 31.01.04, 13:13





Zitieren
Login





