Hi,
I am using GWT2.3 in my project.
I want to increase editableTextBox width when user click on
editableTextCell.
Problem is My Column width is 200 Px. when user clicks on editableTextCell
then that TextBox is width(around 125px) in EditableTextCell is less as
compare to column width.
I added EditTextCell in Celltable's column
Column<Record, String> stringColumn = new Column<RecordVO, String>(new
EditTextCell()) {
// My Code
}
cellTable.addColumn(stringColumn, "MyColumn");
cellTable.setColumnWidth(checkBoxColumn, 200, Unit.PX);
I tried following way to increase TextBox width but problem is I cannot
edit in textbox + focus not losses
@Override
> public void onBrowserEvent(Context context, Element
> elem,Record object, NativeEvent event) {
> String type = event.getType();
>
> int editedTexBoxSize =
> (cellTable.getOffsetWidth()-100)/cellTable.getColumnCount();
>
> if(elem.getInnerHTML().startsWith("<INPUT")){
> String test = elem.getInnerHTML();
> // test = <INPUT tabIndex=-1 value=P
> __eventBits="2048"></INPUT>
>
> test= test.replace("value", "
> size="+editedTexBoxSize+" value");
>
// test = <INPUT tabIndex=-1 size=131 value=P
__eventBits="2048"></INPUT>
>
> elem.setInnerHTML(test);
> }
> super.onBrowserEvent(context, elem, object, event);
> }
>
I want to set TextBox width appear in EditTextCell is equal to column Width.
Any Solution ?
--
Best Regards,
Vaibhav
<http://about.me/vaibhavbhalke>
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.