[Lazarus] Changing a TLabel.Caption

Lukasz Sokol el.es.cr at gmail.com
Mon Nov 28 17:36:55 CET 2011


On 26/11/2011 22:31, Juha Manninen wrote:
> 2011/11/26 Timothy Groves <the.tail.kinker at gmail.com <mailto:the.tail.kinker at gmail.com>>
> 
>     I tried changing a TLabel.Caption property, and got a SIGSEGV.  Here's the offending code:
> 
>     if (cmbProfileMeasures.Text = 'Inches') then
>          begin
>          labPDFWidth.Caption := 'in X';
>          labPDFHeight.Caption := 'in';
>        end
>        else
>          if (cmbProfileMeasures.Text = 'Points') then
>          begin
>              labPDFWidth.Caption := 'pt X';
>              labPDFHeight.Caption := 'pt X';
>          end
>            else
>            begin
>              labPDFWidth.Caption := 'cm X';
>              labPDFHeight.Caption := 'cm X';
>          end;
> 
> 
> The controls (and form) are not created for some reason.
> The code itself looks OK.
> 
> Juha
> 
> 
Wild guess : OP is putting this code into FormCreate handler ?

L.






More information about the Lazarus mailing list