HerrVorragend 10 Posted October 9, 2014 Hello everyone, i want to add Buttons and Text to an existing ListBox. Is it possible? And when, how? Thanks!! Share this post Link to post Share on other sites
Schatten 289 Posted October 9, 2014 (edited) For adding text: https://community.bistudio.com/wiki/lbAdd. Adding buttons to listbox? Never did. I have not found mention about this possibility in documentation: https://community.bistudio.com/wiki/DialogControls-ListBoxes. Edited October 9, 2014 by Schatten Share this post Link to post Share on other sites
HerrVorragend 10 Posted October 9, 2014 For adding text: https://community.bistudio.com/wiki/lbAdd.Adding buttons to listbox? Never did. I have not found mention about this possibility in documentation: https://community.bistudio.com/wiki/DialogControls-ListBoxes. The documentation is very poor (compare to Java-Doc). I saw the menu in King of the Hill by SA-Matra. The buy menu is scrollable and has pictures, text, buttons, etc... Maybe its not a ListBox? Share this post Link to post Share on other sites
Schatten 289 Posted October 9, 2014 I saw the menu in King of the Hill by SA-Matra.The buy menu is scrollable and has pictures, text, buttons, etc... Maybe its not a ListBox? Maybe. I didn't see how it is implemented in KotH. See documentation: https://community.bistudio.com/wiki/Category:Dialogs Share this post Link to post Share on other sites
Tajin 349 Posted October 9, 2014 It might be using structured text for the buttons instead of actual GUIelements. Share this post Link to post Share on other sites
hogscraper 10 Posted October 9, 2014 https://community.bistudio.com/wiki/lbSetPicture Share this post Link to post Share on other sites
iceman77 18 Posted October 9, 2014 Yes it's possible. There are tons of LB commands. Share this post Link to post Share on other sites
HerrVorragend 10 Posted October 10, 2014 i know the documentation, but i don't know which command i have to use. i'm allready using sbSetPicture. But i can't add a button... Share this post Link to post Share on other sites
Sniperwolf572 758 Posted October 10, 2014 i know the documentation, but i don't know which command i have to use.i'm allready using sbSetPicture. But i can't add a button... With ListNBox, you can add a button on the left and the right side of the entry (like here), if that's what you are after. Share this post Link to post Share on other sites
HerrVorragend 10 Posted October 10, 2014 (edited) With ListNBox, you can add a button on the left and the right side of the entry (like here), if that's what you are after. yes i know. But SA-Matra build a GUI with a Scroll-List containing (different!) Buttons, Text, Pictures Like this: http://cloud-2.steampowered.com/ugc/25093013939107042/C8AF8BC2F0CFD0E892762655B88D03B259B15E91/ (477 kB) It is also possible to hide entrys! Edited October 10, 2014 by HerrVorragend Share this post Link to post Share on other sites
Tajin 349 Posted October 10, 2014 Have you tried to insert structured text into a listbox yet? If that works, you could do pretty much anything with it. Then again you could always look at how exactly it is done in wasteland since you're referring to that anyway. Share this post Link to post Share on other sites
Sniperwolf572 758 Posted October 10, 2014 yes i know. But SA-Matra build a GUI with a Scroll-List containing (different!) Buttons, Text, Pictures Can you show an example of what you mean? Buttons, pictures and text are in the example of the ListNBox I've given. Share this post Link to post Share on other sites
samatra 85 Posted October 10, 2014 Reposting the answer from https://forums.arma.su/forum/main-category/main-forum/king-of-the-hill/14118-scripting-question-how-to-add-buttons-textfields-etc-to-listbox Its not ListBox or ListNBox but set of different controls laid out to appear like list inside controls group. I prepare 100 instances of each control for each list line and when menu opens I use these controls to build the menu while hiding unused leftovers through script. Now, with introduction of ctrlCreate it can be done much easier without having to have 100s of controls on the dialog as you can create exactly as much as you need of fly. How list items look in process of development: http://cloud-4.steampowered.com/ugc/577877533472077430/BA3E1D3B3A22CC431CA5648F126103BCBAE89731/ http://cloud-4.steampowered.com/ugc/577877533463059390/1E3980D04AEF8CB0D5D26619969FFA0914DD4BBA/ First I make single list item to make sure it looks how I want it, then I copy 100 sets of the list item (by using preprocessor macros) in the dialog and the script does the rest in onLoad event of the dialog or whenever you need to build the list again. Share this post Link to post Share on other sites