I’ve been porting an application from RB to Xojo and have run into an issue.
I’ve got a window. A container control is embedded within it at runtime. The container control consists of a pagepanel (6 panels) with various controls on each panel. The problem is a listbox on panel 5. During the embed method, the listbox’s CellBackgroundPaint event is firing, which is causing an OutOfBounds exception due to the variables it relies on not being loaded yet (they are loaded based on the user’s activity). Since the listbox is on panel 5 and the pagepanel starts off on panel 0, I don’t expect the CellBackgroundPaint event to fire (since its not visible). In RB it works as expected, but in Xojo I’m getting the exception. I’ve verified in the dubugger that the listbox’s parent is the pagepanel and the panel index is 5.
To make it stranger, I’ve got another container control which is very similar to the problem one, but this issue is not happening! Anyone in Xojoland have any insights for me?