Make selected line's background blue

ufukufuk Member Posts: 514
Hi,

I am trying to make the selected line's background blue. I tried to send Shift+Space combination but it gives error. Is it possible to send this key combination or have you found any other way to make the selected line different from the others (except OnFormat)?

This is not an important case but users don't like a small black triangle :D

My code was:
IF ISCLEAR(WShell) THEN
  IF NOT CREATE(WShell) THEN EXIT;
WShell.SendKeys('+{SPACE}');
Ufuk Asci
Pargesoft

Comments

  • jlandeenjlandeen Member Posts: 524
    I don't think there is anything in the Navision environment that you could use to do that easily. The OnFormat triggers are the only way I've ever been able to update lines or textboxes based on the data in them.

    One way to programmitically change an objects background colour/size/format based on data is to have 2 controls based on the same data and then show or hide them as required. However as it sounds like you're trying to use this with a Table box...I don't think that would work.

    Also I would be a little concerned with code that is sending keys to a table box on a form. How do you know which field could be active when the sendkeys command is being sent too? It could result in you sending a " " character into a field you don't want too.
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
  • matttraxmatttrax Member Posts: 2,309
    I think you could do a SETSELECTED. I don't have a client in front of me right now, but I think that's a function. You could do maybe a CurrForm.SETSELECTED(rec);

    Could be completely off base, though.
  • ufukufuk Member Posts: 514
    Also I would be a little concerned with code that is sending keys to a table box on a form. How do you know which field could be active when the sendkeys command is being sent too? It could result in you sending a " " character into a field you don't want too.

    I am thinking of OnAfterGetCurrentRecord with help of OnTimer. After the open forms I will wait for a few time then I will run the code. (Otherwise it could run for all rec)
    I think you could do a SETSELECTED. I don't have a client in front of me right now, but I think that's a function. You could do maybe a CurrForm.SETSELECTED(rec);

    There isn't a setselected function. In fact the line is also selected by the user. So there isn't any other function need to get the selection.

    Regards,
    Ufuk Asci
    Pargesoft
Sign In or Register to comment.