마우스를 이용해 점,선,면 등을 구현하는것은
자료실에서 소스를 찾을수있었는데요
제가 따! 원하는것은 마우스 기능없이
키보드조작 즉, shift+방향키 또는 ctrl+방향키 등으로
포인트를 이동시키고 점선면...을 그리는것이지요
일단 이 포인트에는 DrawFocusRect를 이용했구요
if (Shift = ([ssShift])) then
begin
if Key = vk_down then
begin
Image1.Canvas.Brush.Color := clBackGround;
Image1.Canvas.DrawFocusRect(d_rect);
d_rect.Top := d_rect.Top + 1;
d_rect.Bottom:= d_rect.Bottom + 1;
Image1.Canvas.DrawFocusRect(d_rect);
end
else if Key = vk_up then
begin
Image1.Canvas.Brush.Color := clBackGround;
Image1.Canvas.DrawFocusRect(d_rect);
d_rect.Top := d_rect.Top - 1;
d_rect.Bottom:= d_rect.Bottom - 1;
Image1.Canvas.DrawFocusRect(d_rect);
end
else if Key = vk_right then
begin
Image1.Canvas.Brush.Color := clBackGround;
Image1.Canvas.DrawFocusRect(d_rect);
d_rect.Left := d_rect.Left + 1;
d_rect.Right := d_rect.Right + 1;
Image1.Canvas.DrawFocusRect(d_rect);
end
else if Key = vk_left then
begin
Image1.Canvas.Brush.Color := clBackGround;
Image1.Canvas.DrawFocusRect(d_rect);
d_rect.Left := d_rect.Left - 1;
d_rect.Right := d_rect.Right - 1;
Image1.Canvas.DrawFocusRect(d_rect);
end;
Exit;
end;
if (Shift = ([ssAlt])) then
begin
if Key = vk_down then
begin
Image1.Canvas.Brush.Color := clBackGround;
Image1.Canvas.DrawFocusRect(d_rect);
d_rect.Top := d_rect.Top + ScrollBox1.VertScrollBar.Increment;
d_rect.Bottom:= d_rect.Bottom + ScrollBox1.VertScrollBar.Increment;
Image1.Canvas.DrawFocusRect(d_rect);
end
else if Key = vk_up then
begin
Image1.Canvas.Brush.Color := clBackGround;
Image1.Canvas.DrawFocusRect(d_rect);
d_rect.Top := d_rect.Top - ScrollBox1.VertScrollBar.Increment;
d_rect.Bottom:= d_rect.Bottom - ScrollBox1.VertScrollBar.Increment;
Image1.Canvas.DrawFocusRect(d_rect);
end
else if Key = vk_right then
begin
Image1.Canvas.Brush.Color := clBackGround;
Image1.Canvas.DrawFocusRect(d_rect);
d_rect.Left := d_rect.Left + ScrollBox1.HorzScrollBar.Increment;
d_rect.Right := d_rect.Right + ScrollBox1.HorzScrollBar.Increment;
Image1.Canvas.DrawFocusRect(d_rect);
end
else if Key = vk_left then
begin
Image1.Canvas.Brush.Color := clBackGround;
Image1.Canvas.DrawFocusRect(d_rect);
d_rect.Left := d_rect.Left - ScrollBox1.HorzScrollBar.Increment;
d_rect.Right := d_rect.Right - ScrollBox1.HorzScrollBar.Increment;
Image1.Canvas.DrawFocusRect(d_rect);
end
else if Key = vk_next then
begin
end
else if Key = vk_prior then
begin
end;
Exit;
end;
if (Shift = ([ssCtrl])) then
begin
if Key = vk_return then
...
...
이런식으로 방향키를 조작하게끔했어요
첫번째질문>>> 근데 포커스가 선명치않고 너무 흐려서 그러는데 border를 굵게 한다거나
그런방법이 있는지 알고 싶구여
두번째질문>>> 다른 기발한 방법!!! ^^;; 있음 좀 갈켜주십사하구영~
아..제가봐두 넘 말도안되는 질문인것같기는하지만..
히히 지금껏 진~~짜 막막할때마다 여기 열분들의 도움으로 살아가고있는(??)
저로써는 또한번 두드리게되는군요 쩝...헤헤
여러 고수님덜 자알 좀 부탁드립니다아~~
꾸뻑
(아이구~ 예의도바르지....^^;;)