Re: [Lazarus] Setting a groupbox caption bold?

2019-03-31 Thread Werner Pamler via lazarus

Am 01.04.2019 um 00:09 schrieb Bo Berglund via lazarus:

I have a configuration setting form where I have used group boxes to
collect properties that belong together.
But the groupbox border is not really well defined so I would like to
be able to augment the form visually by setting the caption of the
group boxes to bold.
But I find no such property for the group box...

Is there a way or am I out of luck?


I use this code for TGroupbox, TRadiogroup and TCheckGroup:

procedure BoldGroup(AControl: TWinControl);
var
  i: Integer;
  propinfo: PPropInfo;
  cntrl: TControl;
  fnt: TFont;
begin
  for i:=0 to AControl.ControlCount-1 do begin
    cntrl := AControl.Controls[i];
    propinfo := GetPropInfo(cntrl, 'ParentFont');
    if propinfo <> nil then
  SetOrdProp(cntrl, propinfo, Longint(false));
    propinfo := GetPropInfo(cntrl, 'Font');
    if propinfo <> nil then begin
  fnt := TFont(GetObjectProp(cntrl, 'Font'));
  fnt.Style := [];
  SetObjectProp(cntrl, 'Font', fnt);
    end;
  end;
  AControl.Font.Style := [fsBold];
--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Setting a groupbox caption bold?

2019-03-31 Thread Bo Berglund via lazarus
I have a configuration setting form where I have used group boxes to
collect properties that belong together.
But the groupbox border is not really well defined so I would like to
be able to augment the form visually by setting the caption of the
group boxes to bold.
But I find no such property for the group box...

Is there a way or am I out of luck?

Using Lazarus 2.0.0 with fpc 3.0.4 x64 on Windows 7 x64.
Compiling as 64 bit binaries.


-- 
Bo Berglund
Developer in Sweden

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus