View | Details | Raw Unified | Return to bug 8907
Collapse All | Expand All

(-)a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TableLayoutSettings.cs (-2 / +16 lines)
Lines 164-172 namespace System.Windows.Forms Link Here
164
			int row;
164
			int row;
165
165
166
			if (!columns.TryGetValue (control, out column))
166
			if (!columns.TryGetValue (control, out column))
167
				column = -1;
167
			{
168
				if (!(control is Control) || !columns.TryGetValue ((control as Control).Name, out column))
169
					column = -1;
170
			}
168
			if (!rows.TryGetValue (control, out row))
171
			if (!rows.TryGetValue (control, out row))
169
				row = -1;
172
			{
173
				if (!(control is Control) || !rows.TryGetValue ((control as Control).Name, out row))
174
					row = -1;
175
			}
170
176
171
			return new TableLayoutPanelCellPosition (column, row);
177
			return new TableLayoutPanelCellPosition (column, row);
172
		}
178
		}
Lines 181-186 namespace System.Windows.Forms Link Here
181
187
182
			if (columns.TryGetValue (control, out retval))
188
			if (columns.TryGetValue (control, out retval))
183
				return retval;
189
				return retval;
190
			if ((control is Control) && columns.TryGetValue ((control as Control).Name, out retval))
191
				return retval;
184
192
185
			return -1;
193
			return -1;
186
		}
194
		}
Lines 194-199 namespace System.Windows.Forms Link Here
194
202
195
			if (column_spans.TryGetValue (control, out retval))
203
			if (column_spans.TryGetValue (control, out retval))
196
				return retval;
204
				return retval;
205
			if ((control is Control) && column_spans.TryGetValue ((control as Control).Name, out retval))
206
				return retval;
197
207
198
			return 1;
208
			return 1;
199
		}
209
		}
Lines 208-213 namespace System.Windows.Forms Link Here
208
218
209
			if (rows.TryGetValue (control, out retval))
219
			if (rows.TryGetValue (control, out retval))
210
				return retval;
220
				return retval;
221
			if ((control is Control) && rows.TryGetValue ((control as Control).Name, out retval))
222
				return retval;
211
223
212
			return -1;
224
			return -1;
213
		}
225
		}
Lines 221-226 namespace System.Windows.Forms Link Here
221
233
222
			if (row_spans.TryGetValue (control, out retval))
234
			if (row_spans.TryGetValue (control, out retval))
223
				return retval;
235
				return retval;
236
			if ((control is Control) && row_spans.TryGetValue ((control as Control).Name, out retval))
237
				return retval;
224
238
225
			return 1;
239
			return 1;
226
		}
240
		}

Return to bug 8907