문제

I have GtkComboBoxText in which first Item text is small and last item Text is too long. Because of the long Text width set to long text length. I want to set its width to small text length. How do I achieve this ?

도움이 되었습니까?

해결책

Unfortunately set_wrap_width() doesn't seem to have anything to do with controlling the width of the widget. I think you want to set the width-chars and possibly the wrap-width or ellipsize & ellpisize-set properties of the cell renderer that the combo box uses to display the items in it. You can get a list of the renderers (there should only be one item in the list for a simple GtkComboBoxText) with get_cells() and then find the GtkCellRendererText and set the properties that you want on it.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top