Fastscript bug

Hi

I'm using FastScript 1.30 and Delphi 7. If I try to create an editbox like the following

edtErrorText := TEdit.Create(frmDealer);
edtErrorText.Name := 'edtErrorText';
edtErrorText.Parent := frmDealer;
edtErrorText.SetBounds(12,76, 358, 21);
edtErrorText.Text := 'This is an error message';
edtErrorText.ReadOnly := True;

then the text appears right-aligned and NOT read-only. If I comment out the readonly line then all appears as it should.

It looks like setting ReadOnly to True sets the align to right aligned instead

Is this a bug?

Cheers

Steve

Comments

  • edited 5:41AM
    if you have full source code, change the fs_iinterpreter.pas:

    procedure TfsPropertyHelper.SetValue(const Value: Variant);
    var
    p: PPropInfo;
    Instance: TObject;
    IntVal: Integer;
    begin
    if IsReadOnly then Exit;
    Instance := TObject(Integer(ParentValue));

    if FIsPublished then
    begin
    p := GetPropInfo(Instance.ClassInfo, Name);
    if p <> nil then
    case p.PropType^.Kind of
    tkInteger, tkSet, tkChar, tkWChar, tkEnumeration, tkClass:
    begin
    if Typ = fvtBool then
    if Value = True then
    IntVal := 1 else
    IntVal := 0
    else
    IntVal := Integer(Value);
    SetOrdProp(Instance, p, IntVal);
    end;

    tkFloat:
    SetFloatProp(Instance, p, Extended(Value));

    tkString, tkLString, tkWString:
    SetStrProp(Instance, p, String(Value));

    tkVariant:
    SetVariantProp(Instance, p, Value);
    end;
    end
    else if Assigned(FOnSetValue) then
    FOnSetValue(Instance, FClassRef, Uppercase(Name), Value);
    end;

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.