Working with Lines

Request for help on DynamicReports

Moderator: ricardo

Working with Lines

Postby mvmamorim » Tue Dec 05, 2017 12:25 pm

Hi,

I'm trying to create something like a line separator with text that should look like this:
Image

But what I'm getting is this:
Image

Here's the code:

Code: Select all
    public static HorizontalListBuilder createDivisor(String name) {
        HorizontalListBuilder hList = cmp.horizontalList();
        VerticalListBuilder vList = cmp.verticalList();
       
        vList.add(
            cmp.line(),
            cmp.gap(0, 2),
            cmp.line()               
        );
       
        hList.add(
            cmp.text(name).setStyle(stl.style().setVerticalTextAlignment(
                VerticalTextAlignment.MIDDLE).setFontSize(12).setBold(true)),
            vList
        );

        return hList;
    }


I don't know why its getting this rotated lines and not straight lines.
I tryied to put the text in the background, but it always go bellow the lines.

Is it possible to do what I want to do?

Thanks in advance.
mvmamorim
 
Posts: 1
Joined: Tue Dec 05, 2017 11:52 am

Return to Help

Who is online

Users browsing this forum: No registered users and 2 guests

cron