Prev Previous Post   Next Post Next
Old 16th November 2009, 02:44   #1
dougcvc
Junior Member
 
Join Date: May 2009
Posts: 16
nsdialogs combobox problem

Hello,

I am having a problem with a nsdialogs combo box list which seems to behave differently when i type something in to when i click and select an option from the list.

I add A, B , and C to the list and have ${NSD_OnChange} bring up a message when it is changed. If i type C in to the box the ${NSD_OnChange} messagebox says "C", whereas if i select "C" in the drop down box it still says "A".

I cant figure out what im doing wrong however.

Here is some example code..

code:
Name test
OutFile test.exe
!include nsDialogs.nsh
XPStyle on
Page custom nsDialogsPage
Page instfiles

var /global Dialog
var /global COMBOBOX


Function nsDialogsPage

nsDialogs::Create 1018
Pop $Dialog
${If} $Dialog == error
Abort
${EndIf}


${NSD_CreateComboBox} 0 30 80% 12u "test"
pop $COMBOBOX

${NSD_CB_AddString} $COMBOBOX A
${NSD_CB_AddString} $COMBOBOX B
${NSD_CB_AddString} $COMBOBOX C
${NSD_CB_SelectString} $COMBOBOX A

${NSD_OnChange} $COMBOBOX SourceChanged

nsDialogs::Show

FunctionEnd


Function SourceChanged
${NSD_GetText} $COMBOBOX $0
messagebox mb_ok "selection is $0"
FunctionEnd


Section ""
SectionEnd



Thanks for any help!
dougcvc is offline   Reply With Quote
 
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump