Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Set Selection Problem - FM Bug?

3 views
Skip to first unread message

se...@codexdata.com

unread,
Feb 15, 2008, 11:13:43 AM2/15/08
to
This seems like it should be simple. I have a text field that is
filled with a very long text, one that extends beyond the visible text
box. On the layout, I add a scroll bar, and of course you can scroll
through it and read it all. I want to set up a script that highlights
a piece of text within that field. I can do this, too, using the "Set
Selection" script step. However, if I pass a portion of the text field
that is _below_ what is viewable in the field, the text is selected,
but the selected text does not scroll into view. Using the scroll bar
of the text field, you can manually scroll to see that the text is
selected properly, but it seems like the text field should
automatically scroll into view. In fact, in the notes of the Help
documents it says, "Data selected out of visual range is scrolled into
view."

FileMaker Pro Advanced 9.0v3

I have a simple filemaker file that I can send anyone who is
interested to demonstrated the problem.

Thanks,

Sean
se...@codexdata.com

Howard Schlossberg

unread,
Feb 15, 2008, 11:49:46 AM2/15/08
to
I was able to easily replicate your issue and I would think it a bug.
Without the scrollbar, there is no way to see the selected text (the
field always displays the very last part of the field's text, regardless
of what's selected). And even with a scrollbar, you shouldn't have to
scroll to get there. Please be sure to report such bugs to
<http://filemaker.com/company/problems.html>!

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg
FM Professional Solutions, Inc. Los Angeles

FileMaker 8 Certified Developer
Member, FileMaker Business Alliance

se...@codexdata.com

unread,
Feb 15, 2008, 11:59:41 AM2/15/08
to
Thanks Howard. I thought so. I posted it to FileMaker's bug reporting
page.

Cheers,

Sean

Ursus

unread,
Feb 15, 2008, 2:32:43 PM2/15/08
to
While waiting for a solution you could also use the following
Create a custom function

HiLite < SourceText ; SearchText >

Let ( [
W = Length (SourceText ) ;
X = Length ( SearchText ) ;
Y = Left ( SourceText ; X ) ;
Z = If ( Y = SearchText ; X ; 1 ) ] ;

If ( X > 0 and Y = SearchText ;
TextSize ( TextStyleAdd ( Y ; Bold ) ; 18 ) ;
Left ( SourceText ; 1 )
) &

If ( X > 0 and W > 0 ;
Hilite ( Right ( SourceText ; W - Z ) ; SearchText ) ;
Right ( SourceText ; W - 1 )
)
)

You have a field with your source-text (say it is called Source)
Create a Textfield gSearch set it to global
Create a calculation cHiLite < Text ; HiLite ( Source ; gSearch )

Type the text you want to search into the gSearch field. The result is a
textfield with all the words highlited. Be aware it works for whole words.
Could perhaps also be set to work with a script.

Keep well, Ursus

<se...@codexdata.com> schreef in bericht
news:a1b942e5-b15d-4e10...@s13g2000prd.googlegroups.com...

se...@codexdata.com

unread,
Feb 17, 2008, 5:39:26 PM2/17/08
to
Hi Ursus,

Thanks for the function. I looked at it and it appears to work to
highlight the text, but I don't think it will solve my problem. I need
the function to "snap" to the selected text. I have these long texts
and the field that displays them is relatively small. When I highlight
a bit of text (via a script) I need the text field to scroll the
highlighted bit into focus. This is the aspect of the script step, Set
Selection that is not working properly (although it does seem to
highlight the text properly). If you know a way to modify your
function to automatically scroll through a text field until the
highlighted portion is visible, that would be great!

Sincerely,

Sean

0 new messages