(10-07-2023, 11:10 PM)DerVVulfman Wrote: There are things to touch up of course...
I have a dedicated class for all graphics. And the buttons for the new scrolling listbox does not use what I used in the previous scrollbar. So I either migrate these new buttons to that class, or see how to adapt the old ones to work.
I don't have an '@index' value set up. Based on the other listbox, it assumes you 'click' the desired data and it just takes it now. There's nothing as yet to define the index position at start... as in an assumed default data. So there's that to likewise accomplish.
And I need to ensure that clicking on the scrollbar doesn't interfere with any currently highlighted/selected data.
But with what I have accomplished, replacing the combobox (or dropdown list box) may be readily be made in much the same fashion.
I still haven't dealt with migrating the graphics to the dedicated class, and I haven't dealt with separating list/scrollbar detection. BUT I do have a functional @index value setup.
I also ensure the following properties are completely functional:
object.width = value in pixels
Width of the widget
object.height = value in pixels
Height of the widget
object.font_name = font filename
Font/text style in use
object.font_size = font/text size
Size of the font
object.font_bold = true/false
Is the font boldfaced or not?
object.font_italic = true/false
Is the font italicized or not?
object.font_color = Color.new value
What color is the text in the list
object.font_highlight = Color.new value
Color of the text if highlighted
object.highlight = Color.new value
Color of the highlight bar
object.fill = Color.new value
Background color if no background image is used
object.image = image filename
Bacground image that scrolls with the text
object.image_stretch = true/false
Does the image stretch or tile?
object.data = defined array of new/replacement data
Replaces the widget's data list
object.add_item(text, data [index [,enabled]])
Can add an individual formatted data item
object.disable_item(index)
Yep. A listed item can be disabled
object.enable_item(index)
And yep, the reverse
object.enabled?(index)
Just returns true or false if a data item is enabled
object.delete_item(index)
Just as it says
object.clear_list
Erases all the data
object.clear_selection
This 'UN' highlights whatever is highlighted
Heckuva list, eh? Well, I still have some things to take care of.
object.border = Color.new value
Color of the widget border
object.border_outline = true/false
Does a border outline exist?
THIS ... doesn't function properly. The premise is to make an outline around the entire widget or not. Its gonna take a little more effort. But doable.
And when I (1) change the size of the font, (2) add/remove items from the list or (3) change the height of the list, the scroll bar's increment system needs to be recalculated.
BUT, at least I know what's needed.