This is a static archive of our old Q&A Site. Please post any new questions and answers at

Info column auto-wrapping


When I set the info column with either col_set_str(); or col_append_fstr(); it doesn't auto wrap the sentence onto the next line when the info column is full. Is there a function I can use to fix this or will I have to determine the length of the string and insert new line feeds where necessary??

asked 10 Feb '13, 15:23

StealthUE's gravatar image

accept rate: 100%

One Answer:


Currently, Wireshark does not set up the widget used to render columns in the packet list, the GtkCellRendererText widget, to do word-wrapping, so you would have to determine the length of the string and insert new lines where necessary.

Note that "where necessary" can't mean "where necessary to keep the string from filling up the info column", because that width is adjustable.

The GtkCellRendererText widget can do word-wrapping, but only does so if the "wrap-width" property is set, which sounds as if, in order to make wrapping happen, Wireshark would have to wire in a wrap width, and that wrap width that would take effect regardless of how wide the column actually is. It might be possible to have the code adjust the wrap width when the column is resized. That's not likely to happen in the near future, however.

answered 10 Feb '13, 18:28

Guy%20Harris's gravatar image

Guy Harris ♦♦
accept rate: 19%

Is the same true for the lines in the Packet Details pane?

(15 May '14, 19:53) lid