Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 14 AUG 2006 01:25:48PM Jim Peters wrote:

This seemed simple enough… I wanted to clear the selection of an EditTable row (highlighted dark blue) when moving to a different EditTable just to avoid some possible user confusion.

This seemed like something that could be taken care of by setting its SELPOS to null or 0:@FM:0 or something similar. No go. I can move the highlighted row up and down with SELPOS if I enter a positive number or -1 for the row and col values, but I can't make it go away.

I tried some of the more obvious other properties and events with no success.

Is this a job for SendMessage, or am I just overlooking something embarassingly obvious? :-)

Surely somebody knows a quick easy way to do this.

Thanks!

Jim


At 14 AUG 2006 04:10PM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:

Jim,

Try this:

pre.code {

 background-color: #E5E5E5;
 border: 1px solid #000000;
 width: 640px;
 padding: 5px;
 font-family: courier, verdana, arial, serif;
 margin: 0px 10px auto;

}


   equ DTM_SELROW$ to ( 1024 + 59 )
   
   objxArray=       @window : ".TABLE_1"
   propArray=       "HANDLE"
   
   objxArray := @rm : @window : ".TABLE_1"
   propArray := @rm : "SELPOS"

   dataArray=       get_Property( objxArray, propArray )

   hwnd     =       dataArray1,@rm
   selPos   =       dataArraycol2()+1,@rm

   selRow=selPos<2>
   
   call sendMessage( hwnd, DTM_SELROW$, 0, selRow ) 

The Sprezzatura Group

World leaders in all things RevSoft


At 14 AUG 2006 05:25PM Jim Peters wrote:

Hmm… That LOOKS like it ought to do something. I made that into a little re-usable function, guessing as to how it might work to do the reverse operation. No joy.

Tracing it through with the debugger it does what it is supposed to… right down to the SendMessage. Unfortunately nothing changes on the EditTable.

Is this something that is documented in an insert record or something, or is is Rev Guru head knowledge?

By the way, how do you quote inserts nice and neat like you did here? I don't see any buttons for stuff like that, and I have learned not to experiment with html tags with no way to edit after the fact.


Compile Function EditTable_SelectRow(Control, Row)

Clears or adds a selection Declare Function Get_Property, Unassigned Declare Subroutine SendMessage equ DTM_SELROW$ to ( 1024 + 59 ) If Unassigned(Row) Then Row=0 If Unassigned(Control) Then Control=" If Control # "" Then objxArray= Control propArray= "HANDLE" objxArray := @rm : Control propArray := @rm : "SELPOS" dataArray= get_Property( objxArray, propArray ) hwnd = dataArray1,@rm selPos = dataArraycol2()+1,@rm selRow=selPos If Row=0 Then call sendMessage( hwnd, DTM_SELROW$, 0, selRow ) End Else call sendMessage( hwnd, DTM_SELROW$, 1, Row ) End End Return 0 </QUOTE> —- === At 14 AUG 2006 06:26PM The Sprezzatura Group wrote: === <QUOTE>Sorry Jim, it's late here :) EditTable SendMessage API calls are always 0-based, not 1 based, so the code I posted should have been: pre.code { background-color: #E5E5E5; border: 1px solid #000000; width: 640px; padding: 5px; font-family: courier, verdana, arial, serif; margin: 0px 10px auto; } <code> equ DTM_SELROW$ to ( 1024 + 59 ) objxArray= @window : ".TABLE_1" propArray= "HANDLE" objxArray := @rm : @window : ".TABLE_1" propArray := @rm : "SELPOS" dataArray= get_Property( objxArray, propArray ) hwnd = dataArray1,@rm selPos = dataArraycol2()+1,@rm selRow=selPos call sendMessage( hwnd, DTM_SELROW$, 0, selRow - 1 ) </code> Note the -1 subtracted from selRow. As for formatting it's all down to CSS. You need the following code enclosed in square brackets: pre.code { background-color: #E5E5E5; border: 1px solid #000000; width: 640px; padding: 5px; font-family: courier, verdana, arial, serif; margin: 0px 10px auto; } <code> INSERT YOUR CODE HERE - REMEMBER TO ESCAPE </code> The Sprezzatura Group World leaders in all things RevSoft </QUOTE> —- === At 14 AUG 2006 07:06PM Jim Peters wrote: === <QUOTE>Ah, now it works, and it works pretty slick at that! There is joy. Setting the 3rd parameter to a 1 instead of 0 selects the specified row too as had I guessed, if one needs to go the other direction. call sendMessage( hwnd, DTM_SELROW$, 1, Row -1 ) Thank you! </QUOTE> View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/8bb53d5098c4af35852571ca005fbf49.txt
  • Last modified: 2024/01/04 20:57
  • by 127.0.0.1