Manually Positioning custom Detail Panel Rows

Hello,

I have, using Slate, created my own additions to a Category in the Details Panel of my own Class.
This in and of itself is no issue.
However when I changed the version on which the Project ran on to the latest UE5 version I noticed that the custom row that I created was positioned at the very bottom of the Category that I added it into.
Whereas in UE4 the Row would always be at the Top, which is what id actually like.


So my question. Is there a way for me to manually decide at what position/order the row should be at, within the Category?

I would really appreciate any help with this as it doesn’t seem like something as straight forward as one would think. :slightly_smiling_face:

I’m also curious to this. I preferred when my buttons appeared on top in UE4 instead of on the bottom of the category it’s attached to.

I don’t have time to get into it this week, but let us know if you find anything.

2 Likes

Well I’ve spent quite some hours today looking through engine code to figure this out without much luck at this point.

From what I saw (or didn’t), there wasn’t anything to directly set the the Position/Order/Priority of your custom row in Slate, as you would have if you simply created a UPROPERTY/UFUNCTION specifier and gave it the “DisplayPriority” Tag. Which is used in the PropertyEditorHelpers “OrderPropertiesFromMetaData” function to manually dictate the order of rows that HAVE the Meta Keyword specifically.


So it will most likely require further delving into the depths of UE’s UI creation process to figure out how or where it reads the determining factor for when it builds the Categories Rows.

Hope you find something, ill keep on trying for today and see if I can find anything at all.

1 Like

Did anyone have any luck with this? I have yet to find a way to do this.
Which seems relatively silly to me as this should be a somewhat basic operation and shouldn’t be so hard to find.

Although not a solution, I used a workaround to get done what I wanted.
I created a pre-existing Variable in the class I was editing. Set its sort priority Meta tag to 1 (so that its on top of other edited stuff - but it will be in its original order of position with other pre-existing Variables in the class unless manually set priority)


//Get reference to the Property we want to Edit
TSharedPtr<IPropertyHandle> PropertyHandle = DetailBuilder.GetProperty(GET_MEMBER_NAME_CHECKED(MyClass, VarName));

//Get reference to the row representing the Variable
IDetailPropertyRow* Row = DetailBuilder.EditDefaultProperty(PropertyHandle);

//With access to the row now, you can simply edit the slate as such:
Row->CustomWidget()
.NameContent()
[
   //You can add anything you want here, 
   //but if you want to keep the name this is a simple way
   PropertyHandle ->CreatePropertyNameWidget()
]
.ValueContent()
[
   //Add anything you want to do with Slate here
   //ie. A button, dropdown, asset/path picker, etc.
]

Although I still hope that there is or in the future will simple said have a way added to allow us to manually position any custom pure Slate added rows!
Hope this helps someone :upside_down_face: