Peculiar behavior flexgrid similar to Martin's editable flexgrid (Solved)
Hello guys! Long time no see... I have been very busy so I wasn't able to come on before.
I tried browsing the forum for an answer to this problem I found out. This bug occured when I was coding an editable flexgrid which is similar to the one Martin posted in the CodeBank and it is a particular one.
I will attach the project so you all can see what I mean. The problem seems to happen when you have a column which width is greater than the flexgrid's width.
When you click on that cell the TextBox is located on the place of the cell but since the width is greater than the flexgrid's then it covers the whole control and surpases it.
How can I avoid this to happen? I mean, I thought I could do something as checking the position and the width to see if it surpases the control's width limit... But if I did that and the grid has its scrollbar then I would need to know the width of the scrollbar to substract it and I am afraid I don't know how to do that.
Any suggestions or a workaround?
Thanks in advance!
Last edited by Tec-Nico; Apr 8th, 2004 at 02:14 AM.
We miss you, friend... Rest in Peace, we will take care of the rest of it.
[vbcode]
On Error Me.Fault = False
[/vbcode]
- Silence is the human way to share ignorance
Tec-Nico
I remember I saw that API before but I didn't think about using it (Because I didn't remember about the API and also because I forgot where that example I saved is)
Other thing... How could you tell if a Cell is partially shown?
I mean, part of the Cell could be hidden by one of the scrollbars and the ColIsVisible or RowIsVisible properties will "lie" about it... Do you know if there is a way to tell?
(And excuse me for being an annoyance, but how would you use the GetScrollBarInfo API to know if it is visible or not? Does it need a special Type like other APIs?)
We miss you, friend... Rest in Peace, we will take care of the rest of it.
[vbcode]
On Error Me.Fault = False
[/vbcode]
- Silence is the human way to share ignorance
Tec-Nico
I made some research and I came to this code which seems to be working fine.
Here I post it.
Anyway, I would like to know if there is a way to know if a cell is just partially visible (it may be or not hidden by a scrollbar and just part of it would be visible.. I will upload a picture to show so)
We miss you, friend... Rest in Peace, we will take care of the rest of it.
[vbcode]
On Error Me.Fault = False
[/vbcode]
- Silence is the human way to share ignorance
Tec-Nico
I must say that part of the code (The GetScrollBarInfo procedure) was not written by me... I found it in the forum but I forgot the name of who posted it.
Whoever he is, Thanks!
We miss you, friend... Rest in Peace, we will take care of the rest of it.
[vbcode]
On Error Me.Fault = False
[/vbcode]
- Silence is the human way to share ignorance
Tec-Nico