JB47394 30 Posted November 18, 2019 I'm trying to reuse the RscDisplayConfigure dialog box. It's the one that lets players change keyboard bindings. I'm using it as a basis for setting mission-specific keybindings in a package that players will be familiar with. I don't actually use it for much other than showing the lists of mission-specific actions that players can bind. The complication comes in when trying to load the list box showing the actions and their current key bindings. It's a straight listbox, not a listnbox, and it appears to use an ancient capability of list boxes to have two columns. This is configured via the attributes mainCollumW [sic] and secndCollumW [sic]. My problem is loading the control. A straight lbAdd isn't going to get anything loaded into the second column. I've tried all sorts of notation silliness such as a comma-separated list, a tab-separated list, an array (syntax error), and even a string of an array (both single and double quote versions). Does anyone know how to work with a two-column listbox? I can hack things up and swap out the listbox for a listnbox, but it doesn't look the same. A listnbox will select the entire row while the two-column listbox only selects the first column. So I'm trying to find an old timer who figured this out. Share this post Link to post Share on other sites
killzone_kid 1326 Posted November 19, 2019 7 hours ago, JB47394 said: This is configured via the attributes mainCollumW [sic] and secndCollumW [sic]. How do you know this? Share this post Link to post Share on other sites
Larrow 2801 Posted November 19, 2019 lbSetText lbSetTextRight A row has to be added first before lbSetText# can overwrite the text at index. disableSerialization; _display = findDisplay 46 createDisplay "RscDisplayEmpty"; _lb = _display ctrlCreate[ "RscListBoxKeys", 10001 ]; _lb ctrlSetPosition[ 0, 0, 1, 1 ]; _lb lbAdd "Test"; _indexToOverwrite = _lb lbAdd "Overwrite"; _lb lbSetText[ _indexToOverwrite, "Left" ]; _lb lbSetTextRight[ _indexToOverwrite, "Right" ]; _lb ctrlCommit 0; 12 hours ago, JB47394 said: A listnbox will select the entire row while the two-column listbox only selects the first column. This is not true, a listbox with text left and right will still select the whole row. There is likely some engine functionality/magic done when the bindings listbox is shown. 5 hours ago, killzone_kid said: How do you know this? As it is an attribute given on the wiki for listbox's. 1 1 Share this post Link to post Share on other sites
JB47394 30 Posted November 19, 2019 Thanks for the information, Larrow. The resulting "right" text is right justified and, as you pointed out, the entire row is selected on a click. As I cannot seem to duplicate the interface, I'll just build one around ListNBox. Share this post Link to post Share on other sites
killzone_kid 1326 Posted November 20, 2019 20 hours ago, Larrow said: As it is an attribute given on the wiki for listbox's. Updated. In other words this is the engine functionality hooked to config options and cannot be modded easily, unless you are rewriting config key bindings dialog Share this post Link to post Share on other sites
Larrow 2801 Posted November 20, 2019 23 hours ago, JB47394 said: I'll just build one around ListNBox. Or controlsTable, then each bind row can have multiple controls to do what ever you require. 4 hours ago, killzone_kid said: In other words this is the engine functionality hooked to config options and cannot be modded easily, unless you are rewriting config key bindings dialog I do not agree that the columns attributes are particularly bound to the RscListBoxKeys control/key binds dialog usage. Left and Right columns are usable on a normal listbox. The only engine side functionality is that left and right columns are treated differently (separate selections/containers) when used specifically as the games keybinds dialog. 1 Share this post Link to post Share on other sites