Rusty Well-Known Member Licensed User Longtime User Oct 13, 2016 #1 I have created a scrollview in the designer and then in code I add check box views: Code: Copy Dim chkbx As CheckBox chkbx.initialize("chkbx") chkbx.text = "checkbox" ScrollView1.panel.addview(chkbx, 0dip, 0dip, 100dip, 100dip) ... sub chkbx_Click Dim x as checkbox x = sender ''''at this point sender is null The click event fires but SENDER is null. Any ideas of what causes this? Rusty
I have created a scrollview in the designer and then in code I add check box views: Code: Copy Dim chkbx As CheckBox chkbx.initialize("chkbx") chkbx.text = "checkbox" ScrollView1.panel.addview(chkbx, 0dip, 0dip, 100dip, 100dip) ... sub chkbx_Click Dim x as checkbox x = sender ''''at this point sender is null The click event fires but SENDER is null. Any ideas of what causes this? Rusty
I inakigarm Well-Known Member Licensed User Longtime User Oct 13, 2016 #2 The Checkbox event is not Click, is CheckedChange: Code: Copy Sub CheckBox1_CheckedChange(Checked As Boolean) End Sub Upvote 0
The Checkbox event is not Click, is CheckedChange: Code: Copy Sub CheckBox1_CheckedChange(Checked As Boolean) End Sub
Rusty Well-Known Member Licensed User Longtime User Oct 13, 2016 #3 my mistake, in my post, i typed it instead of copying it from code. My code has chkbx_checkedChange(checked as boolean) and Sender is NULL when the checkedchange event fires...don't understand why... I took out all breakpoints and the Sender NULL issue disappeared...argh! Thanks for the help Upvote 0
my mistake, in my post, i typed it instead of copying it from code. My code has chkbx_checkedChange(checked as boolean) and Sender is NULL when the checkedchange event fires...don't understand why... I took out all breakpoints and the Sender NULL issue disappeared...argh! Thanks for the help
I inakigarm Well-Known Member Licensed User Longtime User Oct 13, 2016 #4 Works here (adding the checkbox at Designer - layout): Code: Copy Sub CheckBox1_CheckedChange(Checked As Boolean) Dim x As CheckBox x=Sender Log(x.Tag) End Sub Have you added the checkbox by code? Upvote 0
Works here (adding the checkbox at Designer - layout): Code: Copy Sub CheckBox1_CheckedChange(Checked As Boolean) Dim x As CheckBox x=Sender Log(x.Tag) End Sub Have you added the checkbox by code?
klaus Expert Licensed User Longtime User Oct 13, 2016 #5 Are you adding only one or more Checkboxes? If you add more than one you must Dim and Initialize each Checkbox! It would have been easier to help if you had posted the whole code that adds the Checkboxes. Upvote 0
Are you adding only one or more Checkboxes? If you add more than one you must Dim and Initialize each Checkbox! It would have been easier to help if you had posted the whole code that adds the Checkboxes.
Rusty Well-Known Member Licensed User Longtime User Oct 13, 2016 #6 Thanks all, in my post #3, i edited it and indicated that the NULL issue was due to having a debug breakpoint. Once removed, the NULL issue of Sender went away. I appreciate the responses And yes, I create many checkboxes in code and I do dimension each one...I got caught on that one several years ago (thanks) Rusty Upvote 0
Thanks all, in my post #3, i edited it and indicated that the NULL issue was due to having a debug breakpoint. Once removed, the NULL issue of Sender went away. I appreciate the responses And yes, I create many checkboxes in code and I do dimension each one...I got caught on that one several years ago (thanks) Rusty