IO2 Tutorial For FileRequest DirRequest

From NSIS Wiki
Jump to navigationJump to search

Tutorial for FileRequest & DirRequest

  1. Place the cursor in the middle of dialog 105 and select insert control.
  2. * We'll use a label, this way we can "imagine" how they will be *
  3. Choose "label", add some text in the "caption" than hit "ok", see notes.
  4. The control will appear in the dialog, you resize and stretch as many times and form you like, see.
  5. Once you finish, with Resource Hacker, hide the dialog.
  6. You'll get the controls units, see.
  7. In the screenshot example, 51 70 171 14, will be the order for Left, Top, Right, Bottom values for the INI.
  8. So this will be, for:
  9. Left=51
  10. Top=70
  11. Right=171+left_value(51)=171+51=222
  12. Bottom=14+Top_value(70)=14+70=84
  13. Create your INI, with the new values:
  14. Left=51
  15. Top=70
  16. Right=222
  17. Bottom=84

Notes:

  • This is for both FileRequest & DirRequest
  • Type=FileRequest
  • Type=DirRequest
  • Since there isn't a one control that handles both textbox and button (at the same time) in Resource Hacker, I do this tweak.
  • You can do it with both textbox and button for separatly, but it's too much to "think" in the moment of the values.