question about listbox
« on: 17 July 2015, 15:36:53 »
let say i create the variable like this

    tgui::ListBox::Ptr box;

how do i add the gui bit so i can draw to window. because i want to create the variable separate

*

texus

  • *****
  • 1143
    • View Profile
    • Texus's Blog
Re: question about listbox
« Reply #1 on: 17 July 2015, 15:44:55 »
You can call gui.add(box).

I know that there may be some font related problems in certain situations when doing this, but I think I have fixed the most common ones. But it is still advised to add it to the gui before setting properties like its text and text size. The widget is only given a font at the moment it is added to the gui (which is normally immediately at creation) so some text related function might do nothing when no font has been set yet. But it might work to call gui.add after all the other function, I just don't guarantee that it will in tgui 0.6.

Re: question about listbox
« Reply #2 on: 17 July 2015, 16:10:44 »
Thank u very much for your reply . I got it working now but i noticed something weird about my listbox . I attached pic with this post . As u can see the spacing between members aren't really align correctly

*

texus

  • *****
  • 1143
    • View Profile
    • Texus's Blog
Re: question about listbox
« Reply #3 on: 17 July 2015, 16:15:33 »
I think I already know what the problem is, I'll see if it can be solved easily.

*

texus

  • *****
  • 1143
    • View Profile
    • Texus's Blog
Re: question about listbox
« Reply #4 on: 17 July 2015, 16:39:55 »
A fix has been made, you can download the new version from the master branch on github. You have to compile the library yourself with cmake, there are tutorials for this on my site.

Re: question about listbox
« Reply #5 on: 18 July 2015, 14:23:47 »
Sorry for the late reply. Thank u very much for the fix