When focus leaves an edit table (either by Ctrl-Enter or Tab) the row of the last active SELPOS remains blue. In the LOSTFOCUS script of the edit table I use set_property(ctrlentid,'TOPPOS',1:@fm:1) to send the cursor to the its 'home' position, but the last active SELPOS row still remains blue. It's mostly a visual distraction, particularly when a form has numerous edit tables on it.
Does anyone know of a way to get rid of these blue rows in an edit table on lost focus? (Just in case you're wondering, Vanish is not an option.)
Thanks
[email protected] onmouseover=window.status=email greg james;return(true)"
Greg,
TOPPOS is for scrolling the edit table.
You might want that too, of course, but use SELPOS if you want your blue line somewhere else. The same value - 1:@fm:1 works fine if you want it at the first row.
If you want to get rid of the blue line altogether, uncheck Permit Row Selection in the More department of Edit Table Properties. Then you'll get a dotted line around the selected cell instead of a blue line on the selected row.
- Oystein -
Gurus,
Come to think of it - can one change the Permit Row Selection setting programmatically? I got rid of my blue lines a long time ago for the same reason as Greg, but I had two minds about it. Sometimes it really was OK with a blue line while the edit table had focus.
- Oystein -
If you want to remove the selection of an edittable at any time you can use this code (I don't remember if there is a normal Basic+ way of doing it but we figured this out using the datatable equates and kept on using it):
Declare function SendMessage
Equ DTM_SELROW to 1083
hEdt=Get_Property(@Window:".EDIT_TABLE", "HANDLE")
SelPos=Get_Property(@Window:".EDIT_TABLE", "SELPOS")
Row=SelPos
Row -= 1
rv=SendMessage(hEdt, DTM_SELROW, 0, Row)
This is designed for single row selection edittables, there is a way to clear all selected rows in one call but I don't have the equate handy at the moment. If someone wants it I can respond later.
Oystein & Don,
Thanks for the help. Your suugestions did the trick! As always, I appreciate the help.
[email protected] onmouseover=window.status=email greg james;return(true)"
Thanks, Don.
I'll try out that piece of code in a couple of weeks. (I'm making a lot of new windows now, but I'll have to get the more basic stuff settled first.)
- Oystein -
Hi Oystein,
You can change the permit row selection by changing the DTS_ROWSELECT bit in the Edit Tables STYLE property.
eg. to toggle this setting…
Equ DTS_ROWSELECT$ To 256
Style=Get_property( "SOME_EDITTABLE", "STYLE" )
Style=Iconv( Style3,\00\, "MX" )
If BitAnd( Style, DTS_ROWSELECT$ ) Then
Style -= DTS_ROWSELECT ; * If it's set take it off
End Else
Style += DTS_ROWSELECT$ ; * otherwise add it
End
Style=0x" : Oconv( Style, "MX" )
Call Set_Property( "SOME_EDITTABLE","STYLE", Style )
World Leaders in all things RevSoft
Carl,
Thanks! That's the …erm… bit I needed.
Btw - sure is a lot of code to change one single bit!
![]()
- Oystein -