[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TableView.EditWith not working


But it seems the wiki warning for Edit() is also true for EditWith()

Ie. if you do not use the Click event then arrow keys operate the TableView
not the MaskBox

So i'd recommend using the Click event instead.
Maybe control Editing or not with the Ctrl key?
Public Sub TableView1_Click()

  If TableView1.Column <> 1 Or If Not Mouse.Control Then Return

  TableView1.EditWith(MaskBox1)

End

Respects
BruceS


On Mon, 2 Jun 2025 at 12:23, Bruce Steers <bsteers4@xxxxxxxxx> wrote:

> Okay seems it also works in the DblClick event that is essentially
> Activate i guess.
>
>
> On Mon, 2 Jun 2025 at 12:20, Bruce Steers <bsteers4@xxxxxxxxx> wrote:
>
>> I think it's the same rules as TableView.Edit() command
>> https://gambaswiki.org/wiki/comp/gb.form/tableview/edit
>>
>>  you can only use it in the Click event not the Activate event.
>> I tested it and can confirm it works as expected if you use the Click
>> event.
>>
>> I guess the wiki should also say that in EditWith help>
>>
>> Respects
>> BruceS
>>
>>
>> On Mon, 2 Jun 2025 at 00:16, Lee <t.lee.davidson@xxxxxxxxx> wrote:
>>
>>> On 6/1/25 6:47 PM, Lee wrote:
>>> > I don't know what I'm doing wrong, but I cannot get .EditWith to work
>>> with a MaskBox. I have not tried any other editor control.
>>> >
>>> > Simple project attached.
>>>
>>> Sorry, this is with gb.gui.qt which loads gb.qt6 on my system. I tried
>>> with gb.qt5 and the editor still gets immediately hidden.
>>>
>>>
>>> --
>>> Lee
>>>
>>> --- Gambas User List Netiquette [
>>> https://gambaswiki.org/wiki/doc/netiquette] ----
>>> --- Gambas User List Archive [
>>> https://lists.gambas-basic.org/archive/user] ----
>>>
>>>
>>>

Follow-Ups:
Re: TableView.EditWith not workingBB <adamnt42@xxxxxxxxx>
Re: TableView.EditWith not workingLee <t.lee.davidson@xxxxxxxxx>
References:
TableView.EditWith not workingLee <t.lee.davidson@xxxxxxxxx>
Re: TableView.EditWith not workingLee <t.lee.davidson@xxxxxxxxx>
Re: TableView.EditWith not workingBruce Steers <bsteers4@xxxxxxxxx>
Re: TableView.EditWith not workingBruce Steers <bsteers4@xxxxxxxxx>