Print Page | Close Window

CXTPControlComboBox::Copy don't copy selected item

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=20410
Printed Date: 28 November 2024 at 10:10am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPControlComboBox::Copy don't copy selected item
Posted By: KirillMueller
Subject: CXTPControlComboBox::Copy don't copy selected item
Date Posted: 09 December 2012 at 5:18am
After CXTPControlComboBox::Copy, the copied control still has -1 as selected item. Is this by design?

I've fixed it in my copy of the code by adding 

SetCurSel(pControlCombo->GetCurSel());

as last statement (!) in CXTPControlComboBox::Copy, just after CXTPControlPopup::Copy(...). Adding it at any earlier point cannot work because the list of items is copied only in the CXTPControlPopup::Copy(...) call.

Otherwise, is there a way to make sure that a ComboBox control added to the "Quick Access" controls has the same state as the original control?



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net