Skip to content
⌘ NSIS Forum Archive

nsDialogs NSD_Del_String not working?

1 posts

chatterjb#

nsDialogs NSD_Del_String not working?

I've got a simple callback function when a button is clicked to remove the selected item from a listbox. It works correctly only if the topmost item is selected. Otherwise, it seems like the item directly above the actual selection gets removed rom the LB. Here's the callback:

Function Callback_RemoveSite
  LogEx::Write " RemoveSite button clicked. Inside callback function."
  ${NSD_LB_GetSelection} $Listbox_SiteNameID $0
  ${NSD_LB_DelString} $Listbox_SiteNameID $0
FunctionEnd 
And here is the snippet of the dialog/page where it's potentially called:

${NSD_CreateListBox} 0u 30u 150u 90u
Pop $Listbox_SiteNameID
${NSD_CreateButton} 172u 105u 58u 12u "--> Remove Site" 
Pop $Button_RemoveSite 
${NSD_OnClick} $Button_RemoveSite Callback_RemoveSite 
I'm not a GUI expert, but am I missing somthing here?