hey everyone, i want to acheive the visualliztion similar to the File dropdown main menu of the ue5, but for that i have to add spacing after the Live Sync. can i achive this without adding the space?

If i write like this "Live Sync "), its works but it look bad is their any alternative for this.
void FHelperModule::FillMenu(FMenuBuilder& MenuBuilder)
{
// Add a heading for File Transfer
MenuBuilder.BeginSection(“FileTransfer”, NSLOCTEXT(“Helper”, “FileTransferHeading”, “FILE TRANSFER”));
{

    // Fill the menu with additional options if needed under the heading
    MenuBuilder.AddMenuEntry(
        NSLOCTEXT("Helper", "MenuLiveSyncLocKey", "Live Sync                                        "),
        NSLOCTEXT("Helper", "MenuLiveSyncTooltipKey", "Description of Live Sync"),
        FSlateIcon(),
        FUIAction(FExecuteAction::CreateRaw(this, &FHelperModule::HandleLiveSync))
    );
}
MenuBuilder.EndSection();

// Add more menu options as needed without a heading

}
here is the pic:

If i write "Live Sync "),
here is the code:
void FHelperModule::FillMenu(FMenuBuilder& MenuBuilder)
{
// Add a heading for File Transfer
MenuBuilder.BeginSection(“FileTransfer”, NSLOCTEXT(“Helper”, “FileTransferHeading”, “FILE TRANSFER”));
{

    // Fill the menu with additional options if needed under the heading
    MenuBuilder.AddMenuEntry(
        NSLOCTEXT("Helper", "MenuLiveSyncLocKey", "Live Sync                                        "),
        NSLOCTEXT("Helper", "MenuLiveSyncTooltipKey", "Description of Live Sync"),
        FSlateIcon(),
        FUIAction(FExecuteAction::CreateRaw(this, &FHelperModule::HandleLiveSync))
    );
}
MenuBuilder.EndSection();

// Add more menu options as needed without a heading

}

it look like this:

i have tried padding but it did not worked.

1 Like

I’m not in front of the computer right now so it may not be accurate. This may also not be helpful because I do not fully understand your situation and intend. However, if I remember correctly, there is an overloaded version of the MenuBuilder.AddMenuEntry function that can get the parameter of SWidget. I thought maybe I could use that.

And also, this could be helpful to you: Extended Syntax | Markdown Guide