The ListBox object does allow css to be passed in. I do not know what i should type in to style the scrollbar though.
I have tried to do that by using “set css style” and I typed in the following:
Set scrollbar-face-color to #000000;
Set scrollbar-shadow-color to #2D2C4D;
Set scrollbar-highlight-color to #7D7E94;
Set scrollbar-3dlight-color to #7D7E94;
Set scrollbar-darkshadow-color to #2D2C4D;
Set scrollbar-track-color to #7D7E94;
Set scrollbar-arrow-color to #C1C1D1;
None of the above seem to work.
Please note that I have successfully managed to centre the list box items and I changed their font as well. However I cannot do anything to the scrollbar, which looks so dull…
My second part of question is the following: how can I hide it if I ever need to?
Would all the styles be preserved if I export my game to mobile?
Thank you for your reply,
I had read that article rather carefully before i posted my question. There is no answer regarding styling the scrollbar. I either miss some detail or you had not read my question carefully enough. Thank you for your contribution anyway.
If i do miss something important in that article, specify the detail that might push me forward. Otherwise read my question again and have a second shot at helping. I strongly encourage you to do so!
Develop games in your browser. Powerful, performant & highly capable.
where use the list? it is so important ? you can use other method.. i told you cause with all my experience with listbox i find it this method useless.. i dont know what you have in your mind but feel free to tell us what exactly you need meaby we find you other method
Thank you for coming back to me, i really appreciate it!
What i have built is the following:
0. I have a textbox where a user types in words (strings).Please note, I never know how many strings the user types in.
1. the strings are added both to an array and i give the user a chance to see what they have already typed in. This is where i use the ListBox to display the list of strings. This choice came to me naturally, because there is a scrollbar built in, which makes it easy to browse (it is a pity there is no horizontal scrollbar, but i can live with it by extending the list wide enough so that 99% of words fit in), but the problem is i detest the way the vertical scrollbar looks like. I do need it though in case the list is too big, then scrolling is essential to browse the content.
2. the user also has a chance to remove something from the array, which they see in the ListBox.
3. then my game begins.
Therefore i need something that displays my array as a list with easy add/remove method, just to clarify I use only a 1d array. I have everything working the way i want to, expect i cannot tolerate how crude the scrollbar looks. Styling the list items is fine, i cannot do anything to that scrollbar though.
I am open to alternative suggestions. However, the only thing i need is to style that "bloody" scrollbar. If something is not completely clear for any possible reason, i can post my capx shortly as i am now crushing out.
Looking forward to your reply!
you can send capx. use link here
Try using this editor to create a css config table, then use the technique the tutorial in my signature to set it (using a text object). I can't try it now but i think this should work for you.
Thank you for showing me a direction. It seems like a way up through the "rectum" up to the stomach instead of the easy way. I am glad there is a solution though.
BTW, if you want to see what i have been up to, take a look and perhaps do contribute to my new post closely related to the above one. Unfortunately, i have encountered a much more complicated problem than just styling :/