AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

kein Focus im 4 index

Ein Thema von binio · begonnen am 16. Dez 2005 · letzter Beitrag vom 16. Dez 2005
 
Benutzerbild von binio
binio

Registriert seit: 25. Nov 2005
Ort: Werl, Iserlohn, Dortmund, Hagen
85 Beiträge
 
Delphi 2006 Professional
 
#1

kein Focus im 4 index

  Alt 16. Dez 2005, 11:58
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.



Delphi-Quellcode:
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
Robert
if(copy_paste==false)
Programmierer=Hilflos;
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 13:51 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