How to use InlineButton with a ReadOnly field in Odin

90 views Asked by At

I have a list of Record objects defined as:

public struct Record{
    [ReadOnly]
    public int id;
    [ReadOnly]
    public string info;
}

Since it is a recorded info, I dont want member id and info being changed, I marked them as ReadOnly; ReadOnly text field cannot select the content, then I try to add InlineButton for info member so that I can easily copy the content of member info. But ReadOnlyAttribute also affect InlineButton applied on this member, so the button is disabled.

Is there any other way in odin can display a readonly string of content, and available to add inline button to invoke function to copy? Or maybe is there a way in odin dispaly a readonly content that is selectable and copyable?

0

There are 0 answers