Hi All, Need help with a custom ComboBox.
I've created a UserControl (extends UserControl) with the normal stuff (TextBox for selection, picture for selected item and picture for dropdown button). The actual drop down list is a ListView instead of a ListBox for item pictures. This all works well. Problem is with positioning the drop down list. The ListView actually gets re-parented to the underlying form so it will display normally even when the ComboBox is inside a toolbar or other container. Finding the correct X and Y is a problem. Depending on how many containers the actual ComboBox is inside the X and Y become difficult to calculate. It seems the borders or margin padding of the additional containers are not taken into consideration when reporting the X and Y of the ComboBox container. Currently I've tried iterating up the containers via the parent of the ComboBox and add up the left or X properties until the actual parent form is found. This is close but not 100% accurate. By adding in the Desktop.Scale it gets a bit closer but still off. I've looked at the source for the db version of a ComboBox but the internal ListBox is actually used. Does anyone have an example of this or a better idea of how to use a ListView as the List container of the ComboBox? It's not critical but it would be nice to have item pictures in a ListBox or ComboBox. Thanks. ------------------------------------------------------------------------------ Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk _______________________________________________ Gambas-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
