33 - Can't remove columns without releasing and reacquiring

There seems to be no way to get rid of columns without releasing the tooltip and reacquiring it. This poses a problem when the column spacing needs to be changed while the tooltip is already visible, because the only way to have variable column spacing is to use AddColumn() after SetCellMarginH(). Even if I wanted uniform spacing, there's no way to adjust the margins of the existing columns.

This also complicates code that otherwise doesn't need to care if the tooltip is already visible, because it's just going to Clear() it and set it up again.

My suggestion would be twofold:

  1. Support a 0 count of columns in both Acquire() and SetColumnLayout(). This would delete all columns
  2. If Acquire() or SetColumnLayout() is given a number of columns that's fewer than the existing column set, all extra columns should be deleted.

I would further recommend that Acquire()/SetColumnLayout() should update the margins if the cell_margin_h has changed since the column was originally created.

User When Change
eridius Jan 23, 2013 at 06:39 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

  • 1 comment
  • Avatar of eridius eridius Jan 23, 2013 at 23:02 UTC - 0 likes

    Alternatively, we could simply provide a mechanism to update the margins of existing columns. The problem with fixing Acquire()/SetColumnLayout() is the API documentation states that the number of columns given is a guarantee that the tooltip has "at least" that many columns, suggesting that it may still have more. I don't know if there are any addons using LibQTip-1.0 that rely on these functions not deleting extra columns.

    My current thought is to provide a new function, SetColumnMarginH(), which takes a column index and a margin. That margin would be applied to the left edge of the column, just like the cell margin works today (and the API documentation should make this clear).

    Secondly, we could then update SetColumnLayout() to support an invocation that looks like SetColumnLayout(4, "LEFT", 0, "RIGHT", 6, "LEFT, "RIGHT"), with the numbers acting as margins for the next column. Not only does this make setting margins easier, but it's also a more understandable API.

  • 1 comment


Jan 23, 2013
New - Issue has not had initial review yet.
Defect - A shortcoming, fault, or imperfection
Medium - Normal priority.

Reported by

Possible assignees