Jump to content

Font on TUnimEdit, TUnimLabel


RobYost

Recommended Posts

Mobile Edit and Lable are missing the Font property.  I am not very familiar with writing components, but if someone could give me direction on how to do it, I would like to try to make a descendant of TunimEdit that has a font, etc.

 

I am also thinking of starting a group wiki where we could collaborate by adding properties to existing controls.

 

 

For example, I have done something very simple; add a Dirty flag to TUnimEdit.

unit mUniRyEdit;
interface
uses
  System.SysUtils, System.Classes, uniGUIBaseClasses,
  uniGUIClasses, unimEdit;

type
  TmUniRyEdit = class(TUnimEdit)
  private
    FDirty: Boolean;
  protected
    { Protected declarations }
  public
    { Public declarations }
  published
    property Dirty: Boolean read FDirty write FDirty default False;
  end;

procedure Register;

implementation
procedure Register;
begin
  RegisterComponents('UniYostPak', [TmUniRyEdit]);
end;
end.

But I would like to learn to do more.

 

Any help would be appreciated.

 

-Rob

 

 

Link to comment
Share on other sites

Thank you

 

 
UnimLabel1 -> ClientEvents -> UniEvents -> ...
function beforeInit(sender, config)
{
    config.style = "text-align:center; color:green;";
}

This works.  

 

How would I add this to a component?  So it could be set from properties within the component.

Link to comment
Share on other sites

Hi,

 

How would I add this to a component?  So it could be set from properties within the component.

 

At the moment you can try this:

uses ... uniGUIJSUtils, Graphics;
AddStyle('color', uniColor2Web(clGreen));

Best regards,

Link to comment
Share on other sites

  • 6 years later...

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...