PtTree: change size of expand/unexpand "button"?

I’m experimenting with the PtTree widget for displaying the names of a
tree-structured set of windows. The idea is that the user can peruse
the list, expanding/collapsing it at will, to select his/her
destination. I can use the basic functions to populate the text
fields but have a couple of questions.

  1. In a PtTreeItem_t structure, can the “void *data” field be used to
    store a widget ID (e.g. ABW_my_next_window) so that clicking on the
    text will summon that window?

  2. Our environment will include a touch screen monitor. Specifying a
    larger font or item line spacing will make a useful sensitive area for
    selecting an item’s text. But I don’t immediately see a way to
    enlarge the triangular pointers that cause tree expansion/collapse.
    Maybe these reside in a hidden “column one” and have a column
    attribute I can modify. Maybe such an approach is available through
    a PtRawTree. But I have not seen a clue in the Helpviewer.

Comments?

rlb wrote:

I’m experimenting with the PtTree widget for displaying the names of a
tree-structured set of windows. The idea is that the user can peruse
the list, expanding/collapsing it at will, to select his/her
destination. I can use the basic functions to populate the text
fields but have a couple of questions.

  1. In a PtTreeItem_t structure, can the “void *data” field be used to
    store a widget ID (e.g. ABW_my_next_window) so that clicking on the
    text will summon that window?

You can use it for a pointer to anything you want. It’s yours. Of
course, if you use it for a pointer to something that can spontaneously
disappear, such as a window that has its Close button enabled, you need
to be careful to avoid having a dangling pointer there.

  1. Our environment will include a touch screen monitor. Specifying a
    larger font or item line spacing will make a useful sensitive area for
    selecting an item’s text. But I don’t immediately see a way to
    enlarge the triangular pointers that cause tree expansion/collapse.

There isn’t one: they’re hardcoded in PtGenTree. There’s a plan to turn
them into widget resources for 6.4.

You could disable them altogether and use your own images, but you’d
have to handle the expanding and collapsing in your code. A
Pt_CB_GEN_TREE_INPUT callback sounds like a reasonable place to plug
your code into.

Maybe these reside in a hidden “column one” and have a column
attribute I can modify. Maybe such an approach is available through
a PtRawTree. But I have not seen a clue in the Helpviewer.

In any widget derived from PtGenTree, the contents displayed in the
first column consist of a margin (possibly with lines leading to items
below), the (optional) triangular collapse/expand button, and “the
rest”. In PtTree, “the rest” consists of an optional image and a
string. In PtRawTree, “the rest” is whatever your code draws there.

Thanks for the response – lightning fast at that!

About the plan for making expand/collapse graphic a resource: is
there any kind of tentative release date for 6.4?