模拟Nokia手机输入的编辑框[2]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 mindel 的 blog

    ftimer.enabled := true;
    key := #0;
  end;
end;

procedure tnokiaedit.ontimer(sender: tobject);
begin
  sellength := 0;
  selstart := length(text);
  ftimer.enabled := false;
end;

function tnokiaedit.searchfirstchar(const index: keysetint): char;
var
  s: string;
begin
  result := #0;
  s := fkeyset.strings[index];
  if s <> '' then result := s[1];
end;

function tnokiaedit.searchnextchar(const index: keysetint;
  key: char): char;
var
  i: integer;
  s: string;
begin
  s := fkeyset.strings[index];
  i := pos(key, s);
  if i = length(s) then i := 1
  else i := i + 1;
  result := s[i];
end;

procedure tnokiaedit.setkeyset(const value: tstrings);
begin
  if assigned(fkeyset) then fkeyset.assign(value)
  else fkeyset := value;
end;

procedure tnokiaedit.settimerenabled(const value: boolean);
begin
  if ftimer.enabled <> value then
    ftimer.enabled := value;        

本文关键:模拟Nokia手机输入的编辑框
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top