Jump to content
Sign in to follow this  
HerrVorragend

GUI add Buttons and Text to ListBox

Recommended Posts

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
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

It might be using structured text for the buttons instead of actual GUIelements.

Share this post


Link to post
Share on other sites

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
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
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 by HerrVorragend

Share this post


Link to post
Share on other sites

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
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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×