Browse Source

demo: edit: width

mattias 5 months ago
parent
commit
c351f1b580
2 changed files with 4 additions and 2 deletions
  1. 3 1
      demo/Edit/mainunit.pp
  2. 1 1
      src/base/fresnel.edit.pp

+ 3 - 1
demo/Edit/mainunit.pp

@@ -92,7 +92,9 @@ begin
   Edit1.Value:='Edit1';
   Edit1.Parent:=Body1;
   Edit1.Style:='font-size:15px; family:Arial; background-color: yellow;'#10
-     +'border-color: black;'#10; // 'height:30px;width: 100px;';
+     +'border-color: black;'#10
+     +'height:30px;'#10
+     +'width: 100px;'#10;
   Edit1.Focus;
 
   Visible:=true;

+ 1 - 1
src/base/fresnel.edit.pp

@@ -139,7 +139,7 @@ begin
   if IsNan(aMaxHeight) then ;
   lHorzPadding:=GetComputedLength(fcaPaddingLeft)+GetComputedLength(fcaPaddingRight);
   lVertPadding:=GetComputedLength(fcaPaddingTop)+GetComputedLength(fcaPaddingBottom);
-  Lsize:=LFont.TextSize('W');
+  LSize:=LFont.TextSize('W');
   case aMode of
     flmMinHeight,flmMax:
       begin