Page 1 of 1

A little help?

Posted: Thursday 24th October 2019 2:17pm
by salihburhan
I am trying to select the contents of a cell in tableview.
It was default in earlier versions (of the os or gambas3, I do not know)..

Re: A little help?

Posted: Thursday 24th October 2019 3:47pm
by cogier
Hi salihburhan and welcome to the forum.

Attached is an example of how to edit cells in a TableView.

I hope it helps.
TableViewExample.tar.gz
(11.94 KiB) Downloaded 527 times

Re: A little help?

Posted: Friday 25th October 2019 7:58am
by salihburhan
Thank you for the reply..
Though the code does not provide any help.
All I want to do is to select the text inside a cell when I click on it by default. So whatever I type overwrites the content.

No problems before I upgraded from debian 9 to 10 (I might be mistaken here) - or maybe the libraries changed in gambas during that time. This problem I have seems to be new.

It looks trival, but could not solve it.

Re: A little help?

Posted: Friday 25th October 2019 2:57pm
by cogier
I have tried all sorts but I can't select the text in a cell. Anybody got ant ideas on how to do this?

Re: A little help?

Posted: Friday 25th October 2019 5:12pm
by sjsepan
The edit mode apparently defaults to using the TextBox as the 'editor' control, although ComboBox is an option I saw somewhere while digging through this.
The Editor property gives access to this control, and after assigning it to a textbox, I could see the selection members.

Code: Select all

Public Sub TableView1_Click()

  Dim editor As TextBox

  TableView1.Edit()
  editor = TableView1.Editor
  editor.SelectAll()

End
Image

Re: A little help?

Posted: Saturday 26th October 2019 8:35am
by cogier
Beautiful sjsepan. Why didn't I think of that?

Re: A little help?

Posted: Saturday 26th October 2019 11:42am
by sjsepan
There is a lot that is not in the Help index. Yes, the language syntax in present, but explanations / examples would be helpful. I still cannot tell what the purpose of 'Action' property is from looking at the help. (Don't tell me yet -- there must be an explanation of that one written down somewhere. I'm guessing that it's related to MVVM-style 'commands', but ...who knows.)

I just stepped through the list in the TableView properties 'intellisense' in the IDE until I found something that sounded useful. The selection properties were not visible in there, but I suspected that if I assigned the property to a control variable, the selection properties would be there.

It (editor property) is also not mentioned in the PDF books 'GAMBAS from Zip' or 'A Beginner's Guide to Gambas' as far as I can tell. However those two are a good place to start if the help index is silent. And then of course are all the examples which you and others have posted -- that's been invaluable.

Re: A little help?

Posted: Saturday 26th October 2019 12:06pm
by cogier
I can help you with the 'Action' command should you wish.

Note that YOU can add to the help files, you just need a login. You can create one here. Then login here.

I have contributed several times. Here is an example explaining the 'PictureBox.Mode' feature.

Re: A little help?

Posted: Saturday 26th October 2019 6:32pm
by sjsepan
Thanks cogier; I think I already have a logon there, because I tried to report an issue a week or so ago. I'll look into the wiki change once I figure out what I would want to add. :-)

As for Action, I'd accept the offer, except it might make a good post in the general forum. Thnaks,
Steve

Re: A little help?

Posted: Thursday 31st October 2019 4:57pm
by salihburhan
Why did it work about 6 months back?
Any ideas?