← Go back

lnbSetTooltip for Arma 3


Posted on May 10, 2018 at 12:11 (GMT +00:00) by Colin

Creating dialogs for Arma 3 can be a serious pain in the a** and even worse when something does not work or is missing. A good example is ListNBox, adding tooltips to a multi column listbox means you need to add some additional maths to calculate column offset due to there not being any lnbSetTooltip, and instead you need to use lbSetTooltip.

Anyway to save anyone a headache, you can add this function in, using the following function:

//
// API missing function lnbSetTooltip for usage with ListNBox
// Author: Colin J.D. Stewart.
// usage: [ctrl, index, colcount, "text"] call lnbSetTooltip;
//
lnbSetTooltip = {
    params["_ctrl", "_index", "_cols", "_text"];
    
    _ctrl lbSetTooltip [_index + ((_cols-1)*_index), _text];    
};


Params:
_ctrl = the ListNBox control
_index = the index of the row via addRow
_cols = how many columns your listnBox has declared.
_text = the obvious, the text you want for the tooltip

[_row, 5, 3, "My tooltip"] call lnbSetTooltip;



I will occasionally post missing api functions, so keep checking back.
/Scripting/Programming/Game Modding

Search
Tags
Accident Adoption Albums Algorithms Altcoins Animal Rescue AnL Aquarium Arma ArmA nd Leg Array Partitioning Arrays Assembler Assembly Atanasovsko Award Bazaar Binary Search Bitcoin Bohemia Bootstrap Bulgaria Bulgaria Za Mladite Burgas C C++ Celerity Charity Chemical Records Chemical Shock Chemlight Code Competition Compiler Contest Converter Covid-19 CPP Crypto Cryptocurrency css Data Recovery Database DataTables Decode Dedicated Dedicated Server Delphi Development Dialogs Divide & Conquer DIY DnB Drum & Bass Earplugs Event Exchange Eyes Fish Floating-point Flood Fog Freeware Function Funny Gallery Game Game Development Game Modding Gaming Garden Gardening Gazebo GERB GitHub Glitch Hamish Harding Happy New Year Heapify HeapSort Helga HTML HTML entities Introduction Jackie JavaScript JQuery Jungle Lake Language Linker Listbox ListNBox lnbSetTooltip MariaDB Maths Merry Christmas Mini Mining Miningpoolhub Mist Modding MPH Multiplayer Music MySql NGO OceanGate One Nature ORCA organisation OverHertz Paludarium Pandemic Pascal Paul-Henri Nargeolet Paws Furever Pergola Persistence Pets Photography Pier Plugin Programming progress bar Project PX Library Quicksort r53 Racing Replace Scripting Searching Server Shahzada Dawood Simulation Simulator Smoke Snippet Social media Software Sorting Source Sourcecode SQF Statistics Stockton Rush String Strings Submarine Suleman Dawood Terrain Detail Text Titan Tool Tragedy tutorial UCS4Char UE4 Unreal Engine Victims View Distance ViewBug web Web Development Website Welcome Woodworking Ziron Zynk