HiAsm - Конструктор программ

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.



EllipseButton

Сообщений 1 страница 9 из 9

1

Овальная кнопка с пиктограммой. Штатный светодиод для примера отрисовки без антиальясинга
скачать

http://forumupload.ru/uploads/001b/10/a7/2/114415.gif

0

2

Полезный компонент, спасибо, но не хватает ему чего-то:  Fatal: File not found: 'VCLType.dcu'
Погуглил этот файл безуспешно..

Отредактировано Aziz (2021-11-07 21:57:30)

0

3

Aziz
Упс, простите, это мой модуль который я использую в начальной стадии для облегчения портирования с VCL.
Почему только ты первый заметил его отсутствие :cool:

unit VCLType;

interface

uses
  Kol, Windows;

type
  TBitmap = Kol.PBitmap;
  TCanvas = Kol.PCanvas;
  TFont = Kol.PGraphicTool;
  TPen = Kol.PGraphicTool;
  TBrush = Kol.PGraphicTool;
  TStringList = Kol.PStrListEx;
  TStrings = Kol.PStrListEx;
  TList = Kol.PListEx;
  TImageList = Kol.PImageList;
  TTimer = Kol.PTimer;
  TStream = Kol.PStream;
  TIcon = Kol.TIcon;
  TNotifyEvent = Kol.TOnEvent;

const
  IntToStr: function (Value: Integer): string = Kol.Int2Str;
  StrToInt: function (const Value: String): Integer = Kol.Str2Int;
  ColorToRGB: function(Color: TColor): TColor = Kol.Color2RGB;
  Point: function(X,Y: Integer): TPoint = Kol.MakePoint;
  Rect: function(Left,Top,Right,Bottom: Integer): TRect; stdcall = Kol.MakeRect;
  IntToHex: function (Value: DWord; Digits: Integer): string = Kol.Int2Hex;

  LowerCase: function (const S: string): string = Kol.LowerCase;
  UpperCase: function (const S: string): string = Kol.UpperCase;
  Trim: function(const S : string): string = Kol.Trim;

  function StrToIntDef(const S: string; Default: Integer): Integer;
  function Bounds(ALeft, ATop, AWidth, AHeight: Integer): TRect;
  function Min(const A, B: Int64): Int64; overload;
  function Min(const A, B: Single): Single; overload;
  function Min(const A, B: Double): Double; overload;
  function Min(const A, B: Extended): Extended; overload;
  function Max(const A, B: Int64): Int64; overload;
  function Max(const A, B: Single): Single; overload;
  function Max(const A, B: Double): Double; overload;
  function Max(const A, B: Extended): Extended; overload;

implementation

function StrToIntDef(const S: string; Default: Integer): Integer;
var
  E: Integer;
begin
  Val(S, Result, E);
  if E <> 0 then Result := Default;
end;

function Bounds(ALeft, ATop, AWidth, AHeight: Integer): TRect;
begin
  with Result do
  begin
    Left := ALeft;
    Top := ATop;
    Right := ALeft + AWidth;
    Bottom :=  ATop + AHeight;
  end;
end;

function Min(const A, B: Int64): Int64;
begin
  if A < B then
    Result := A
  else
    Result := B;
end;

function Min(const A, B: Single): Single;
begin
  if A < B then
    Result := A
  else
    Result := B;
end;

function Min(const A, B: Double): Double;
begin
  if A < B then
    Result := A
  else
    Result := B;
end;

function Min(const A, B: Extended): Extended;
begin
  if A < B then
    Result := A
  else
    Result := B;
end;

function Max(const A, B: Int64): Int64;
begin
  if A > B then
    Result := A
  else
    Result := B;
end;

function Max(const A, B: Single): Single;
begin
  if A > B then
    Result := A
  else
    Result := B;
end;

function Max(const A, B: Double): Double;
begin
  if A > B then
    Result := A
  else
    Result := B;
end;

function Max(const A, B: Extended): Extended;
begin
  if A > B then
    Result := A
  else
    Result := B;
end;

initialization

finalization

end.

0

4

andrestudio, просто я практик) Спасибо большо, кнопка на пустой форме заработала, только при компиляции вашего примера вот такую ошибку еще выдает:

hiChildForm_5BBCAA0.pas(254) Error: Undeclared identifier: '_prop_Data'

Видимо у вас нестандартный ChildForm ?

Aziz
добавь в паблик секцию _prop_Data: TData; Это же бета версия :crazyfun: там даже события нет на onClick   8-)

0

5

опс

Отредактировано Aziz (2021-11-08 13:50:41)

0

6

Нет я видать изначально не тот pas залил сейчас сиё выглядит так
Извини нечаянно твоё сообщение зацепил
http://forumstatic.ru/files/001b/10/a7/68130.gif

0

7

andrestudio
благодарю, попробую..

0

8

Было бы не плохо, если бы в архиве была исправленная версия
У меня тоже ошибка C:\Program Files (x86)\Hiasm_Alt\Elements\delphi\code\hiEllipseButton.pas(6) Fatal: File not found: 'VCLType.dcu
Плюс не могу найти на какой вкладке элементов эти кнопки?

0

9

Leon, andrestudio уже выложил VCLType.dcu прям здесь (он забыл использовать блок кода так что выглядит оно как куча текста), вот что нужно сделать чтобы сохранить:
Скопируй вот это (можешь из сообщения сверху брать или от сюда):

Код:
unit VCLType;

interface

uses
  Kol, Windows;

type
  TBitmap = Kol.PBitmap;
  TCanvas = Kol.PCanvas;
  TFont = Kol.PGraphicTool;
  TPen = Kol.PGraphicTool;
  TBrush = Kol.PGraphicTool;
  TStringList = Kol.PStrListEx;
  TStrings = Kol.PStrListEx;
  TList = Kol.PListEx;
  TImageList = Kol.PImageList;
  TTimer = Kol.PTimer;
  TStream = Kol.PStream;
  TIcon = Kol.TIcon;
  TNotifyEvent = Kol.TOnEvent;

const
  IntToStr: function (Value: Integer): string = Kol.Int2Str;
  StrToInt: function (const Value: String): Integer = Kol.Str2Int;
  ColorToRGB: function(Color: TColor): TColor = Kol.Color2RGB;
  Point: function(X,Y: Integer): TPoint = Kol.MakePoint;
  Rect: function(Left,Top,Right,Bottom: Integer): TRect; stdcall = Kol.MakeRect;
  IntToHex: function (Value: DWord; Digits: Integer): string = Kol.Int2Hex;

  LowerCase: function (const S: string): string = Kol.LowerCase;
  UpperCase: function (const S: string): string = Kol.UpperCase;
  Trim: function(const S : string): string = Kol.Trim;

  function StrToIntDef(const S: string; Default: Integer): Integer;
  function Bounds(ALeft, ATop, AWidth, AHeight: Integer): TRect;
  function Min(const A, B: Int64): Int64; overload;
  function Min(const A, B: Single): Single; overload;
  function Min(const A, B: Double): Double; overload;
  function Min(const A, B: Extended): Extended; overload;
  function Max(const A, B: Int64): Int64; overload;
  function Max(const A, B: Single): Single; overload;
  function Max(const A, B: Double): Double; overload;
  function Max(const A, B: Extended): Extended; overload;

implementation

function StrToIntDef(const S: string; Default: Integer): Integer;
var
  E: Integer;
begin
  Val(S, Result, E);
  if E <> 0 then Result := Default;
end;

function Bounds(ALeft, ATop, AWidth, AHeight: Integer): TRect;
begin
  with Result do
  begin
    Left := ALeft;
    Top := ATop;
    Right := ALeft + AWidth;
    Bottom :=  ATop + AHeight;
  end;
end;

function Min(const A, B: Int64): Int64;
begin
  if A < B then
    Result := A
  else
    Result := B;
end;

function Min(const A, B: Single): Single;
begin
  if A < B then
    Result := A
  else
    Result := B;
end;

function Min(const A, B: Double): Double;
begin
  if A < B then
    Result := A
  else
    Result := B;
end;

function Min(const A, B: Extended): Extended;
begin
  if A < B then
    Result := A
  else
    Result := B;
end;

function Max(const A, B: Int64): Int64;
begin
  if A > B then
    Result := A
  else
    Result := B;
end;

function Max(const A, B: Single): Single;
begin
  if A > B then
    Result := A
  else
    Result := B;
end;

function Max(const A, B: Double): Double;
begin
  if A > B then
    Result := A
  else
    Result := B;
end;

function Max(const A, B: Extended): Extended;
begin
  if A > B then
    Result := A
  else
    Result := B;
end;

initialization

finalization

end.

и вставь в Блокнот
Потом сохрани его как "(путь к хайасму)\Elements\Delphi\code\VCLType.pas" (без ковычек)

0



Рейтинг форумов | Создать форум бесплатно