Project

General

Profile

Actions

Support #5341

open

WTableCell focus lost

Added by Gunnar Skogsholm over 7 years ago. Updated over 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
10/13/2016
Due date:
% Done:

0%

Estimated time:

Description

How do I catch when the user has clicked away or tabbed away (focus lost) from a WTableCell?

I've tried: blurred().connect( this, &WtTableCell::focus_lost );

Actions #1

Updated by Gunnar Skogsholm over 7 years ago

Ok, I figured it by trial and error. For the click events, I attached to signals from WTableCell, but in this case, I needed to attach a function to the child widget of that WTableCell:

auto editWnd = new Wt::WTextArea( fieldData->string_value() );

auto tableCell = gridCtl->elementAt( Rec, left() ); // triggers WtTable::createCell

tableCell->addWidget( editWnd );

editWnd->blurred().connect( dynamic_cast<WtTableCell*>(tableCell), &WtTableCell::focus_lost );

The documentation should be updated to close this issue out.

Actions

Also available in: Atom PDF