A little help?

Post

Posted
Rating:
#1 (In Topic #329)
Trainee
 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)..
Online now: No Back to the top

Post

Posted
Rating:
#2
Avatar
Guru
cogier is in the usergroup ‘Guru’
Hi salihburhan and welcome to the forum.

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

I hope it helps.

Attachment
Online now: No Back to the top

Post

Posted
Rating:
#3
Trainee
 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.
Online now: No Back to the top

Post

Posted
Rating:
#4
Avatar
Guru
cogier is in the usergroup ‘Guru’
 I have tried all sorts but I can't select the text in a cell. Anybody got ant ideas on how to do this?
Online now: No Back to the top

Post

Posted
Rating:
#5
Avatar
Regular
sjsepan is in the usergroup ‘Regular’
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

Public Sub TableView1_Click()

  Dim editor As TextBox

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

End
<IMG src="%5Battachment=0%5DScreenshot%20from%202019-10-25%2013-11-22.png%5B/attachment%5D"> </IMG>
Online now: No Back to the top

Post

Posted
Rating:
#6
Avatar
Guru
cogier is in the usergroup ‘Guru’
 Beautiful sjsepan. Why didn't I think of that?
Online now: No Back to the top

Post

Posted
Rating:
#7
Avatar
Regular
sjsepan is in the usergroup ‘Regular’
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.
Online now: No Back to the top

Post

Posted
Rating:
#8
Avatar
Guru
cogier is in the usergroup ‘Guru’
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.
Online now: No Back to the top

Post

Posted
Rating:
#9
Avatar
Regular
sjsepan is in the usergroup ‘Regular’
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
Online now: No Back to the top

Post

Posted
Rating:
#10
Trainee
 Why did it work about 6 months back?
Any ideas?
Online now: No Back to the top
1 guest and 0 members have just viewed this.