This is our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

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

StealthUE
667713
accept rate: 100%


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.

permanent link

answered 10 Feb '13, 18:28

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196
accept rate: 19%

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

(15 May '14, 19:53) lid
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×33
×29

question asked: 10 Feb '13, 15:23

question was seen: 2,404 times

last updated: 15 May '14, 19:53

p​o​w​e​r​e​d by O​S​Q​A