unit Ledlp_1b;

interface

uses
  SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  Forms, Dialogs, StdCtrls;

type
  TBookmarkNumberForm = class(TForm)
    BookmarkNumberEdit: TEdit;
    BookmarkNumberLabel: TLabel;
    BookmarkNumberCancelButton: TButton;
    BookmarkNumberOKButton: TButton;
    procedure BookmarkNumberOKButtonClick(Sender: TObject);
    procedure FormShow(Sender: TObject);
  private
  public
  end;

var
  BookmarkNumberForm: TBookmarkNumberForm;

implementation

uses LEdlp_1a;

{$R *.DFM}

procedure TBookmarkNumberForm.BookmarkNumberOKButtonClick(Sender: TObject);
begin
  if StrToInt(BookmarkNumberEdit.Text) > 255 then
  begin
    LEditForm.FBmNum := 255;
    BookmarkNumberEdit.Text := '255';
  end
  else if StrToInt(BookmarkNumberEdit.Text) < 0 then
  begin
    LEditForm.FBmNum := 0;
    BookmarkNumberEdit.Text := '0';
  end
  else
    LEditForm.FBmNum := StrToInt(BookmarkNumberEdit.Text);
end;

procedure TBookmarkNumberForm.FormShow(Sender: TObject);
begin
  BookmarkNumberEdit.SetFocus;
end;

end.
