A little help?

Post Reply
salihburhan
Posts: 3
Joined: Thursday 24th October 2019 2:14pm

A little help?

Post by salihburhan » Thursday 24th October 2019 2:17pm

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)..

User avatar
cogier
Site Admin
Posts: 349
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: A little help?

Post by cogier » Thursday 24th October 2019 3:47pm

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 15 times

salihburhan
Posts: 3
Joined: Thursday 24th October 2019 2:14pm

Re: A little help?

Post by salihburhan » Friday 25th October 2019 7:58am

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.

User avatar
cogier
Site Admin
Posts: 349
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: A little help?

Post by cogier » Friday 25th October 2019 2:57pm

I have tried all sorts but I can't select the text in a cell. Anybody got ant ideas on how to do this?

User avatar
sjsepan
Posts: 40
Joined: Saturday 12th October 2019 10:11pm
Location: Leeper, PA, USA
Contact:

Re: A little help?

Post by sjsepan » Friday 25th October 2019 5:12pm

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
Attachments
Screenshot from 2019-10-25 13-11-22.png
Screenshot from 2019-10-25 13-11-22.png (25.95 KiB) Viewed 276 times

User avatar
cogier
Site Admin
Posts: 349
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: A little help?

Post by cogier » Saturday 26th October 2019 8:35am

Beautiful sjsepan. Why didn't I think of that?

User avatar
sjsepan
Posts: 40
Joined: Saturday 12th October 2019 10:11pm
Location: Leeper, PA, USA
Contact:

Re: A little help?

Post by sjsepan » Saturday 26th October 2019 11:42am

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.

User avatar
cogier
Site Admin
Posts: 349
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: A little help?

Post by cogier » Saturday 26th October 2019 12:06pm

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.

User avatar
sjsepan
Posts: 40
Joined: Saturday 12th October 2019 10:11pm
Location: Leeper, PA, USA
Contact:

Re: A little help?

Post by sjsepan » Saturday 26th October 2019 6:32pm

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

salihburhan
Posts: 3
Joined: Thursday 24th October 2019 2:14pm

Re: A little help?

Post by salihburhan » Thursday 31st October 2019 4:57pm

Why did it work about 6 months back?
Any ideas?

Post Reply