Вниз
Скачать: CL | DM;

Ширина текста в TWinControl   Найти похожие ветки 

← →
Sirruf   (2004-05-20 14:38) [0]

Может быть, вопрос тривиальный, но в факах так ничего и не нашел. Как узнать сабж, чтобы в случае если текст не помещается в компонент TRxLookupEdit, выдавать хинт с полным текстом?


← →
WebErr ©   (2004-05-20 14:43) [1]

GetCharABCWidth + F1


← →
Игорь Шевченко ©   (2004-05-20 14:53) [2]


> Ширина текста в TWinControl

function GetTextWidthInPixels(AText: string; AControl: TControl): integer;
var
 propInfo: PPropInfo;
 thisFont: TFont;
begin
 Result := 0;

 propInfo := GetPropInfo(AControl.ClassInfo, "Font");

 if propInfo <> nil then begin
   thisFont := TFont(GetObjectProp(AControl, "Font"));

   if Assigned(thisFont) then
     with TControlCanvas.Create do
       try
         Control := AControl;
         Font.Assign(thisFont);
         Result  := TextWidth(AText);
       finally
         Free;
       end;
 end;
end;



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.026 c
14-1084444084
Lera
2004-05-13 14:28
2004.05.30
Ребята, подскажите как из приложения вызвать другой EXE файл


3-1084016146
Nazer
2004-05-08 15:35
2004.05.30
Не могу создать индекс


1-1084822229
zep
2004-05-17 23:30
2004.05.30
maskedit


3-1084361939
dimon76
2004-05-12 15:38
2004.05.30
Как ускорить работу команды для ADO UpdateBatch


1-1084813088
Sour
2004-05-17 20:58
2004.05.30
JvInspecor из JCVL




   Наверх