IO2 Tutorial ComboBox DropList Listbox

From NSIS Wiki
Jump to navigationJump to search

Tutorial for Combobox, Droplist & listbox

  1. Place the cursor in the middle of dialog 105 and select insert control.
  2. Choose "COMBOBOX" than hit "ok".
  3. The control will appear in the dialog, you resize and stretch as many times and forms you like.

IO2ComboList1.png

  1. * We put the three controls, we'll only use one: COMBOBOX, see notes below. *
  2. Once you finish, with Resource Hacker, hide the dialog.
  3. You'll get the controls units. File:IO2ComboList2.png
  1. In the screenshot example, 24 23 151 13, will be the order for Left, Top, Right, Bottom values for the INI.
  2. * We stretch more the object so can be scroll at Nsis runtime, File:IO2ComboList3.png *
  3. Got new values, File:IO2ComboList4.png.
  4. New ones: 24 23 151 72
  5. So this will be, for:
  6. Left=24
  7. Top=23
  8. Right=151+left_value(24)=151+24=175
  9. Bottom=72+Top_value(23)=72+23=95
  10. Create your INI, with the new values:
  11. Left=24
  12. Top=23
  13. Right=175
  14. Bottom=95

Notes:

  • This is the same for Combobox, Droplist & listbox.
  • Type=Combobox
  • Type=Droplist
  • Type=listbox
  • For the three of them you must add more bottom and/or right, depends about how long the words are and the number of them.