No, trying to bind the event explicitly didn't work. However following the suggestion in TN02b did the trick! Be careful though, that TechNote has numerous typos.
Thank you Roland! --- In nsbasic-ce@yahoogroups.com, "michiman56" <rriemer...@...> wrote: > > Ahh, I read over TN02b and I am beginning to see a glimmer here. > > I'll need to play with it and see, but this might get me on the right track. > The TechNote says this was fixed in NSB/CE version 5.1 but I might be doing > something that causes the same sort of grief even with a newer NSB/CE. > > I keep forgetting about the tricks NSB uses to try to emulate a VB6-like > programming paradigm. > > > Does anyone know if you can wire up event handlers manually in NSB/CE, as you > would for script hosted in Desktop WSH or Internet Explorer? I'm picturing > something of the form: > > Set lvwServNav.OnClick = GetRef("lvwServNav_OnClick") > > > --- In nsbasic-ce@yahoogroups.com, "roland" <sgh@> wrote: > > > > Try it so: > > > > You create a Frame, you assign the ListView to the Frame then: > > > > ... > > AddObject "Frame","FramePartnerCeg",4, 28, 232, 236 > > AddObject "NSBasic.comctl.ListView.1", "NSListViewPartnerCeg", 0, 0, 232, > > 236, FramePartnerCeg 'FrmPartner_Form > > FramePartnerCeg.Hide > > ... > > > > You assign the Frame to the Form at the time of the sheet's formation then. > > > > Sub FrmPartner_Load > > ... > > SetParent FramePartnerCeg, FrmPartner_Form > > FramePartnerCeg.Show > > ... > > End Sub > > > > The events will work already so. > > > > You find help here: > > > > http://www.nsbasic.com/ce/info/technotes/TN02b.htm > > > > > > --- In nsbasic-ce@yahoogroups.com, "michiman56" <rriemersma@> wrote: > > > > > > NSB/CE version 8.1.2a > > > > > > I am having problems catching the OnClick event in certain > > > "NSBasic.comctl.ListView.1" controls. I have one where I can never catch > > > the event in the OnClick handler: > > > > > > Sub lvwServNav_OnClick(oEvent) > > > MsgBox "Click" > > > End Sub > > > > > > I do have a number of added ListItems. Clicking on an Item does cause > > > the item to be selected (visible highlight set on). This listview > > > control is in Report view. > > > > > > In the very same program I have another Form that is mostly clear of > > > controls. Adding another NSListView and an OnClick handler there works > > > fine! > > > > > > Using menu actions I can move from one Form to the other and back. The > > > "important" one (lvwServNav) never works, while the dummy test one > > > (NSListView1) always does. Both are added via AddObject, and I have > > > verified they're being added to the Form they "belong to" (verified the > > > AddObject "parent" parameter). > > > > > > I have gone over my typing many times and I don't think I'm spelling the > > > event handler routine wrong. I've even commented out the settings for > > > various properties such as HideColumnHeaders, MultiSelect, FullRowSelect, > > > etc. > > > > > > > > > Are there some conditions that I have missed that could cause the event > > > not to fire? Is there a trick I missed in naming the event handler > > > properly (I can't see anything I missed)? > > > > > > Other events on this Form such as LabelX_Click and ListBoxX_Click are > > > being fired and handled as expected. > > > > > > -- You received this message because you are subscribed to the Google Groups "nsb-ce" group. To post to this group, send email to nsb...@googlegroups.com. To unsubscribe from this group, send email to nsb-ce+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/nsb-ce?hl=en.