How to display comboBox Editor as default in wxGrid?

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
dhana
Earned a small fee
Earned a small fee
Posts: 15
Joined: Tue Dec 02, 2014 7:25 am

How to display comboBox Editor as default in wxGrid?

Post by dhana » Wed Dec 03, 2014 2:39 pm

Hi,

In wxWidgets 2.8.10,

I am using wxGridCellChoiceEditor for ComboBox Grid,
Problem is it appears once if use Leftmouse click.I want to display the combobox on the screen when opening on wxGrid

Code: Select all

for(int i = 0; i < grid->GetNumberRows(); i++)
{
               wxString strChoices[2] = {"aaa", "bbb"};
		grid->SetCellEditor(i, 0, new wxGridCellChoiceEditor(2, strChoices, false));
		grid->SetCellValue(i,0,"aaa");
		

}

grid->EnableCellEditControl(true);
grid->ShowCellEditControl();
grid->ForceRefresh();
Reply me,if any possible way to do
Last edited by DavidHart on Wed Dec 03, 2014 3:18 pm, edited 1 time in total.
Reason: Edited to add [code] [/code] tags

Manolo
Can't get richer than this
Can't get richer than this
Posts: 713
Joined: Mon Apr 30, 2012 11:07 pm

Re: How to display comboBox Editor as default in wxGrid?

Post by Manolo » Wed Dec 03, 2014 4:22 pm

Use grid->GoToCell(...) before grid->ShowCellEditControl()

dhana
Earned a small fee
Earned a small fee
Posts: 15
Joined: Tue Dec 02, 2014 7:25 am

Re: How to display comboBox Editor as default in wxGrid?

Post by dhana » Thu Dec 04, 2014 5:56 am

I need to make editor of entire column visible.

Post Reply