Thank you for your answer. I solved the problem. <br>The cells have a continuous internal top component. then top is bigger than the field of vision. <br>my control must be placed in the field of view. a cell is (unfortunately) not a container. So I have to insert the control relative to the scroll position. <br>this is <br>tableview [a, b] .y - tableview.scrollY<br>that's it :-), juhuuuuu<br><br>Von meinem Sony Xperia™-Smartphone gesendet<br><br>---- Charlie Ogier schrieb ----<br><br>
<div class="moz-cite-prefix">Hi Peter,<br>
<br>
Try the code below in a new project: -<br>
<br>
<b>'
--------------------------------------------------------------------------------------------------------------------</b><br>
<b>ComboBox1 As ComboBox</b><b><br>
</b><b>TableView1 As TableView</b><b><br>
</b><b><br>
</b><b>Public Sub Form_Open()</b><b><br>
</b><b><br>
</b><b>With Me</b><b><br>
</b><b> .Padding = 5</b><b><br>
</b><b> .Arrangement = <a href="http://Arrange.Vertical">Arrange.Vertical</a></b><b><br>
</b><b>End With</b><b><br>
</b><b><br>
</b><b>ComboBox1 = New ComboBox(Me)</b><b><br>
</b><b><br>
</b><b>With ComboBox1</b><b><br>
</b><b> .Visible = False</b><b><br>
</b><b> .List = ["", "One", "Two", "Three", "Four", "Five"]</b><b><br>
</b><b>End With</b><b><br>
</b><b><br>
</b><b>TableView1 = New TableView(Me) As "TableView1"</b><b><br>
</b><b><br>
</b><b>With TableView1</b><b><br>
</b><b> .Expand = True</b><b><br>
</b><b> .<a href="http://Columns.Count">Columns.Count</a> = 2</b><b><br>
</b><b> .<a href="http://Rows.Count">Rows.Count</a> = 50</b><b><br>
</b><b>End With</b><b><br>
</b><b><br>
</b><b>Form_Resize</b><b><br>
</b><b><br>
</b><b>End </b><b><br>
</b><b><br>
</b><b>Public Sub TableView1_Click()</b><b><br>
</b><b><br>
</b><b><a href="http://TableView1.EditWith">TableView1.EditWith</a>(ComboBox1)</b><b><br>
</b><b><a href="http://ComboBox1.Text">ComboBox1.Text</a> = <a href="http://ComboBox1.List">ComboBox1.List</a>[1]</b><b><br>
</b><b><br>
</b><b>End</b><b><br>
</b><b><br>
</b><b>Public Sub TableView1_Save(Row As Integer, Column As
Integer, Value As String)</b><b><br>
</b><b><br>
</b><b>TableView1[Row, Column].Text = Value</b><b><br>
</b><b><br>
</b><b>End</b><b><br>
</b><b><br>
</b><b>Public Sub Form_Resize()</b><b><br>
</b><b><br>
</b><b><a href="http://TableView1.Columns">TableView1.Columns</a>[0].Width = (TableView1.W - (<a href="http://Me.padding">Me.padding</a> *
2)) / 2 </b><b><br>
</b><b><br>
</b><b>End</b><b><br>
</b><b>'
--------------------------------------------------------------------------------------------------------------------</b><b><br>
</b><b><br>
</b>Hope it helps.<br>
<br>
Charlie<b><br>
</b><b><br>
<br>
<br>
</b>On 11/03/2019 14:27, Peter Peyotle wrote:<br>
</div>
<blockquote type="cite"
cite="mid:lgs2q6qdhmc8ho0bili6s565.1552314359498@email.android.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
Hello and good day.<br>
<br>
I have the following problem:<br>
<br>
I put a combo box (or another control) in a cell of a tableview.
The ComboBox is set by clicking on the cell.<br>
I use the following code:<br>
'
-----------------------------------------------------------------------------------------------<br>
'Gambas class file<br>
<br>
Private myCombo As ComboBox<br>
<br>
Public Sub form_Open ()<br>
myCombo = New ComboBox (<a href="http://TableView1.Children">TableView1.Children</a> [0])<br>
<a href="http://Object.Attach">Object.Attach</a> (TableView1, Me, "tabEvents")<br>
<br>
<a href="http:// TableView1.Columns.Count"> TableView1.Columns.Count</a> = 2<br>
<a href="http:// TableView1.rows.Count"> TableView1.rows.Count</a> = 15<br>
<a href="http:// TableView1.Columns"> TableView1.Columns</a> [0] .Width = TableView1.W / <a href="tel:2 - 15">2 - 15</a><br>
<a href="http:// TableView1.Columns"> TableView1.Columns</a> [1] .Width = TableView1.W / <a href="tel:2 - 15">2 - 15</a><br>
End<br>
<br>
Public Sub showCombo (tabIndex As Integer)<br>
Dim Xstart, CorrY As Integer<br>
<br>
myCombo.w = TableView1 [0, 1] .Width<br>
myCombo.h = TableView1 [0, 1] .Height<br>
<br>
myCombo.Y = TableView1 [tabIndex, 1] .Y<br>
myCombo.X = TableView1 [tabIndex, 1] .x<br>
End<br>
<br>
Public Sub tabEvents_Click ()<br>
<br>
show combo (<a href="http://Last.row">Last.row</a>)<br>
<br>
End<br>
'
--------------------------------------------------------------------------------------------------------------------<br>
<br>
It works very well too.<br>
But, if I scroll the view into the area whose cells are first
visible by scrolling, then the position fails (thus here:
myCombo.Y = TableView1 [tabIndex, 1] .Y)<br>
<br>
Perhaps this can be compensated by a correction factor.<br>
But I think the tableview should also place in the not (always)
visible area correctly.<br>
<br>
Thanks for the help - I need her :-(.<br>
<br>
<br>
<br>
Von meinem Sony Xperia™-Smartphone gesendet<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">
----[ Gambas mailing-list is hosted by <a class="moz-txt-link-freetext" href="https://www.hostsharing.net">https://www.hostsharing.net</a> ]----
</pre>
</blockquote>
<br>