Hi Vincent,
You should not modify fp_TableContainer directly, but only through the
piece table. This is important to keep everything synchronized.
Updating the piece tables will automatically modify the fl and fp
layers. Is there any reason you do not want to call
AP_Dialog_FormatTable::applyChanges() to update the table when the
user kill the focus?
Simon
On Wed, Aug 1, 2012 at 9:14 PM, Vincent Kang <vincent.abiword@gmail.com> wrote:
> Hi,
>
> In my last implementation about Setting Table Height&Width.
> I am using " m_vecProps.addOrReplaceProp("table-width", width); "
> the table will update when redraw.
>
>
> Another way, I also want to set the Table Height and Width at that
> time that users kill focus . So I get 'fp_TableContainer' in
> ap_Dialog_FormatTable. Is there a better way to get fp_TableContainer
> in ap_Dialog_FormatTable? thanks
>
> ap_Dialog_FormatTable.cpp
>
> http://www.abisource.com/viewvc/abiword/branches/gsoc2012dialogs/src/wp/ap/xp/ap_Dialog_FormatTable.cpp?r1=31621&r2=31633
> //update height & width
>
> 706 XAP_Frame *frame = XAP_App::getApp()->getLastFocussedFrame();
> 707 if (!frame) return;
> 708 FV_View * pView = static_cast<FV_View
> *>(frame->getCurrentView());
> 709 fl_BlockLayout * pBL = pView->getCurrentBlock();
> 710 fl_TableLayout * pTL = static_cast<fl_TableLayout
> *>(pBL->myContainingLayout());
> 711 fp_TableContainer * pTab =
> static_cast<fp_TableContainer *>(pTL->getFirstContainer());
> 712 pTab->setWidth(UT_convertInchesToDimension(m_width,DIM_PT));
>
>
>
> Vincent
Received on Thu Aug 2 13:26:05 2012
This archive was generated by hypermail 2.1.8 : Thu Aug 02 2012 - 13:26:06 CEST