Start edit mode with keyboard ?
(1 viewing) (1) Guest
DataGrid for Qt.C++
  • Page:
  • 1

TOPIC: Start edit mode with keyboard ?

Start edit mode with keyboard ?

#459 1 year, 8 months ago
To start editing a cell i must double click into the cell. How can i start editing with keyboard? In Excel you can start editing by press F2 oder type characters, digits etc.. I want to have the same behaviour.
Thanks
Ulrich
  • bigz
  • OFFLINE
  • Developer
  • Karma: 10

Re: Start edit mode with keyboard ?

#462 1 year, 8 months ago
You can set various options for the start cell editing. For this purposes grid has GridEditorActivationPolicy enumerator and GridEditorRepository::setEditorActivationPolicy(GridEditorActivationPolicy policy) function. However, it does not provide start editing by pressing F2. To do that you need to catch F2 press event and invoke - GridViewBase::showEditor() function.

Re: Start edit mode with keyboard ?

#469 1 year, 8 months ago
Hi,
i insert the following into your largedataset demo:
    column = (Qtitan::GridTableColumn *)view->getColumn(2);
    column->setEditorType(Qtitan::StringEditorType);

	Qtitan::GridEditorActivationPolicy editorPolicy = Qtitan::DblClick | Qtitan::KeyPress | Qtitan::Enter;
	column->editorRepository()->setEditorActivationPolicy(editorPolicy);
	column->editorRepository()->setAutoSelect(true);

    //Add cell button to the column.
    column->addButton(Qtitan::TextButton, Qtitan::RightPosition);
    column->addButton(Qtitan::ChoiceButton, Qtitan::RightPosition);


When a string cell i selected and i press a character, then the editor will displayed and the hole text is selected but the character is lost. It's the same behaviour as KeyPress_WithEating.
  • bigz
  • OFFLINE
  • Developer
  • Karma: 10

Re: Start edit mode with keyboard ?

#474 1 year, 7 months ago
This is a bug in our code. Thanks for the information. Bug was fixed and bugfix will be available in the next update.
  • Page:
  • 1
Time to create page: 0.11 seconds

Developer's Newsletter


Register to our Developer Machines newsletter to get informed on all the latest releases of the commercial components for Qt, updates and general knowledges.

Quick Support

Should you need any additional information about our products or licensing, please contact us at the following email addresses:

Get in touch

If you would like to purchase our products or services, but don’t know how to do it the right way, please feel free to contact us:

support@devmachines.com ( any questions related to our products or services )
license@devmachines.com ( questions related to licensing )

Copyright © 2009-2014 Developer Machines. All Rights Reserved.

Login to Developer Machines

Welcome to Developer Machines CMS



Developer Machines Registration



*
*
*
*
*

Fields marked with an asterisk (*) are required.