Author Topic: TBFilelist and line spacing.  (Read 186 times)

jporkkahtc

  • Senior Community Member
  • Posts: 2159
  • Hero Points: 191
  • Text
TBFilelist and line spacing.
« on: March 30, 2021, 07:46:58 pm »
I have customized TBFilelist to include file size and modified time.

An annoying consequence is that the line spacing in this dialog changes -- it gets much tighter.
The dialog opens, and populates and a short time later it redraws with the lines tighter together.

Code: [Select]
#if defined(JPORKKA_JDTUPDATE)
    #define TBTREE_COL_SIZE 2
    #define TBTREE_COL_DATETIME 3

                  {
                      se.datetime.DateTime dt = se.datetime.DateTime.fromTimeF(p_file_date);
                      int y, m, d, h, min, s, ms;
                      dt.toParts(y, m, d, h, min, s, ms);
                      treewid._TreeSetCaption(index, p_buf_size, TBTREE_COL_SIZE); /// Comment out this line to avoid the resizing issue
                      treewid._TreeSetDateTime(index, TBTREE_COL_DATETIME, y, m, d, h, min, s, ms);
               }
#endif

I've narrowed it down to a single line -- if I comment out the call to TreeSetCaption, this resizing doesn't happen.

Is there a way to avoid this problem?

jporkkahtc

  • Senior Community Member
  • Posts: 2159
  • Hero Points: 191
  • Text
Re: TBFilelist and line spacing.
« Reply #1 on: March 30, 2021, 07:59:19 pm »
When this same list is shown via document_tab_list_buffers, this resizing doesn't happen.

Normally, p_line_height==17, and after the resize happens, p_line_height==15