How do I show a selected item?

Compressor

Registered User.
Local time
Today, 10:54
Joined
Sep 23, 2006
Messages
118
I have a main form with several continuous subforms on it. These subforms are based on a selection of fields of a complete and editable form, so these subforms are overview forms so to speak. Whenever a field of a certain record is clicked, the other subforms show the linked data for that record, whenever a field of a certain record is double clicked, the corresponding form opens so data can be edited.

I would like to show which record is selected (record selectors are not enabled) in the way you select text in any application in windows. So when record A (holding fields A1, A2, A3 and A4) is selected in any way, the text should be lit up as if struck with a text-marker pen.

How do I go about that?

It would really be nice, since there is a cascading effect of records going on in the main form, which can get a bit confusing if you have to or want to glimpse at which record is selected. So for ease of use, this feature would really be nice.
 
Thanks, that will help me out most likely.

But immediately I ran into a couple of problems:

Code:
3. Create the following Controls to the form

Name: CtlBack
Control Source: =IIf([SelTop]=[ctlCurrentLine],"ÛÛÛÛÛÛÛÛÛÛÛÛ",Null)

"Û" is character 0219, the easiest way to enter this is to copy and paste from here. Format the font of this control as Terminal.
Place this control on your form so that it is sized to cover the entire area where you would like the background to be. Experiment with the number of "Û" characters as well as the font height to get complete coverage.
Set the background to transparent. Set the foreground to whatever color you want your highlight color to be. Make sure the section background color is different from the highlight color.

Next, for all the controls that will have the background highlight, select them all, change the background color to the highlight color, then change the background color to transparent. (Yes, this step is necessary).

The following two controls can be placed anywhere, and be hidden. You may want to leave them visible to help in seeing how this works, then hide them when done.

Name: ctlCurrentLine
Control Source:=GetLineNumber()

Name: ctlCurrentRecord
Control Source: unbound

There is said: create control on form. What kind of control? I've tried textbox, but when entering the Record Source on the data tab to be =IIf([SelTop]=[ctlCurrentLine],"ÛÛÛÛÛÛÛÛÛÛÛÛ",Null) I get a syntax error about comma's or brackets etc. So... what kind of control? Label doesn't have a control source so that's out too.

Then the ctlCurrentline... Must that be a line? Or how else do I create such a "control". The same goes for the ctlCurrentRecord.

Forgive me newbie for these (most likely) stupid questions.....

And....

Best whishes to all from Amsterdam!!!
 
Yes. Thank you. Now I'll must be able to get it to work on this end.

Thank you very much! :)
 

Users who are viewing this thread

Back
Top Bottom