The problem is the color - it worked when I changed the color from &H00C0C0C0& to &H00C0C0C0.
>I tried to create 7 buttons and event code 'on the fly' as in TN34. >I'm using the CE version 7 of NS Basic. > >The buttons are drawn on the screen and 'graphicaly' click, but the >event does not trigger. > >I then hardcoded an event for 2 of the buttons and it worked. > >I tried the rpncalc example, and saw that the numeric buttons dont work >either. > >Has anyone got this working? > >the code is below > >(this works) >For i = 1 To 7 > name = "b"&CStr(i) > AddObject "CommandButton",name,12+(55-12)*(i-1),80,36,32 > Execute(name & ".Caption = " & CStr(i)) >Next > >(this does not work) >For i = 1 To 7 > name = "b"&CStr(i) > Code = "Sub " & name & "_Click" & vbCrLf & name & ".Backcolor = >&H00C0C0C0&" & vbCrLf & "TextBox1.Text = " & Chr(34) & i & Chr(34) & >vbCrLf & "End Sub" > Execute(Code) >Next > >(using this does work) >Sub b1_click > b1.Backcolor = &H00C0C0C0& > TextBox1.Text = "10" 'for testing >End Sub > >Thanks >Martin > > > >------------------------------------ > >Yahoo! Groups Links > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nsb-ce" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nsb-ce?hl=en -~----------~----~----~----~------~----~------~--~---
