0

expand textbox to 3/4 width grid row

asked 2011-12-19 04:37:13 +0800

dearest555 gravatar image dearest555
111

I add textbox in the grid row but it limit in one column in grid row.
How to expand the size same as merge cell with excel
<grid >
<columns>
<column width="150px"></column>
<column width="220px"></column>
<column width="130px"></column>
<column width="350px"></column>
</columns>
<rows>

<row>
Course to attend :
<textbox id="courseAttend"/>
Training date :
<datebox id="trainingDate">
</row>
<row > <radio id ="comm1" label="Other"/><textbox id="othercomment" width="300px" /> </row>

delete flag offensive retag edit

6 Replies

Sort by ยป oldest newest

answered 2011-12-19 16:13:17 +0800

twiegand gravatar image twiegand
1807 3

dearest555,

Try wrapping your "othercomment" textbox in a cell and use the colspan attribute - something like this:

<grid>	
	<columns> 
		<column width="150px"></column> 
		<column width="220px"></column> 
		<column width="130px"></column> 
		<column width="350px"></column> 
	</columns> 
	<rows> 
		<row> 
			Course to attend : 
			<textbox id="courseAttend"/> 
			Training date :	
			<datebox id="trainingDate"/> 
		</row>	
		<row >
			<radio id ="comm1" label="Other"/>
			<cell colspan="2">
				<textbox id="othercomment" width="300px" /> 
			</cell>
		</row>
	</rows>
</grid>

Hope that helps,

Todd

link publish delete flag offensive edit

answered 2011-12-20 01:45:21 +0800

dearest555 gravatar image dearest555
111

thank you twiegand.It 's very clear code.

link publish delete flag offensive edit

answered 2011-12-20 01:54:01 +0800

dearest555 gravatar image dearest555
111

Todd,
When I add your example code but It showed the error

org.zkoss.zk.ui.metainfo.DefinitionNotFoundException: Component definition not found: cell in [LanguageDefinition: xul/html], [SYS file:/C:/webproject/workspace-ganymede/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Extraining/form.zul line 149 col 24]

Please help.

link publish delete flag offensive edit

answered 2011-12-20 10:44:56 +0800

RichardL gravatar image RichardL
768 4

Todd's code works in Sandbox. What version of ZK are you using? The Cell component is since 5.0.0.

link publish delete flag offensive edit

answered 2011-12-21 01:36:28 +0800

dearest555 gravatar image dearest555
111

I'm using ZK version: 3.6.4.What would the code be?

link publish delete flag offensive edit

answered 2011-12-21 01:48:33 +0800

RichardL gravatar image RichardL
768 4

The setSpans method of Row has been depreciated but considering you're using 3.6.4, you could give it a go. Try this:

<window>
<grid >
<columns>
<column width="150px"></column>
<column width="220px"></column>
<column width="130px"></column>
<column width="350px"></column>
</columns>
<rows>
<row>
Course to attend :
<textbox id="courseAttend"/>
Training date :
<datebox id="trainingDate"/>
</row>
<row spans=",3"> 
<radio id ="comm1" label="Other"/><textbox id="othercomment" width="300px" />
 </row>
</rows>
</grid>
</window>

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2011-12-19 04:37:13 +0800

Seen: 210 times

Last updated: Dec 21 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More