Forum > Third party
Linux combobox Adjustable Height
seany:
Hello
One complaint I have with Lazarus is that the combobox in Lazarus produces a dropdown, that will not be wider than the box itself.
KodeZwerg has described his solution for Windows. That does not work in Linux.
So here is my solution : https://github.com/naturalmechanics/LazarusComboBox
Here I can set width and height with
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- exampleDropDown := TAdvancedDropDown.TAdvancedDropDownList.Create() ; exampleDropDown.Initialize( items); exampleDropDown.dropDownWidth := 100;
etc.
Work is still going on, I still have to correct some problems in the scrolling, and may be keyup-keydown.
Enjoy.
dsiders:
--- Quote from: seany on February 28, 2023, 08:19:38 pm ---Hello
One complaint I have with Lazarus is that the combobox in Lazarus produces a dropdown, that will not be wider than the box itself.
KodeZwerg has described his solution for Windows. That does not work in Linux.
So here is my solution : https://github.com/naturalmechanics/LazarusComboBox
Here I can set width and height with
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- exampleDropDown := TAdvancedDropDown.TAdvancedDropDownList.Create() ; exampleDropDown.Initialize( items); exampleDropDown.dropDownWidth := 100;
etc.
Work is still going on, I still have to correct some problems in the scrolling, and may be keyup-keydown.
Enjoy.
--- End quote ---
So... the existing ItemWidth and DropDownCount properties in TComboBox weren't enough?
Blaazen:
ItemWidth does not seem to be cross-platform (does not anything at least on Qt). DropDownCount should work everywhere.
KodeZwerg:
--- Quote from: Blaazen on February 28, 2023, 10:53:29 pm ---DropDownCount should work everywhere.
--- End quote ---
Are you sure?
Everytime I watch that Image I laugh :D
Blaazen:
I completely forgot those crazy Gtk2 combos. I never liked GTk and Gnome.
Navigation
[0] Message Index
[#] Next page