Search Unity

How to add horizontal line for foldout like Lighting Window

Discussion in 'UI Toolkit' started by Kichang-Kim, May 14, 2019.

  1. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    1,011
    Hi, I have a question about how to add horizontal/vertical line using UIElements.

    Currently, I used EditorGUILayout.FoldoutTitlebar via reflection and IMGUIContainer for mimicing line-splitted foldout, like attached screenshot (red box).

    But I want to write all my UI code via pure UIElements. Is it possible to acheive this by using pure UIElements (without old IMGUIContainer)?

    Thanks.
     

    Attached Files:

  2. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,148
    How about a border colour for the fold out element with the top border set to 1 or 2 pixel size?

    border-color: rgb(153, 153, 153);
    border-top-width: 1px;
     
  3. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    1,011
    This is definitely what I need. Thanks!