Jump to content

How to format text in TUniDBText


DeHeus

Recommended Posts

I'm developing in .NET for 10 years, but I'm pretty new to Delphi (developing about a year), and even more new to UniGui, so forgive me if it's a basic question.

What is the best way to format the text displayed in a TUniDBText?

 

I've a couple of TUniDBText fields on my form, all bound to seperate float fields of the same Datasource. I want the numbers to be displayed with 2 decimal characters.

How can I achieve this?

When there are multiple options what are pro's and con's of each solution. 

Link to comment
Share on other sites

Thanks for your answer, I've got it working.

As columns are created at runtime I've implemented it in the AfterOpen event.

procedure TfrmTestForm.qryItemAfterOpen(DataSet: TDataSet);
begin
    inherited;

    TFloatField(qryItem.FieldByName('FloatField1')).DisplayFormat := ',0.00';
    // some more columns
end;
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...