active line in colour

hello, is it possible to give the active line in a tablebox an other background or foregroundcolour.

You can dynamically change the color of the font (foreground) but not the background. Use the UPDATEFORECOLOR command. Dave Studebaker das@libertyforever

Officially you cannot change the background. However you can use a trick to get the same effect: Let’s assume you want to have the focus of an entry field (let’s call it SearchField) changed to yellow as soon as the user enters that field and change back to default gray if the user leaves the field. First thing you have to do is to define two fields. The first field is a Label. Set the following properties: Name=YellowBack ForeColor=65535 BackColor=65535 BackTransparent=No This Label field now appears as a yellow rectangle. The second field is our SearchField where you want to put in your value. The following property has to be set: BackTransparent=Yes — Now make sure that both fields have exactly the same size and then put the YellowBack Field behind the SearchField. OnActivate of SearchField set CurrForm.YellowBack.VISIBLE := TRUE; respectively OnDeactivate: CurrForm.YellowBack.VISIBLE := FALSE; That’s about it. Now what did we do? The SearchField is transparent so we see whatever is under this field. Per default and if SearchField is deactivated YellowBack is invisible and therefore we see the grey background of the window through the SearchField. Once our SearchField is being activated, YellowBack becomes visible and therefore makes us believe that SearchField has a yellow background. In fact the background of our SearchField was always transparent. We just switched an underlying field on and off. ------- With best regards from Switzerland Marcus Fabian Edited by - fabian on 2001 Mar 27 23:31:27

Marcus I implemented the same system as you. Problem was 6 levels of an option field colour coded. This meant 6 labels and using the code from the Menu system. Switch off all 6 then switch on the One box. Would be so much nicer of we could use control arrays and for loops. (NS if you are watching) ( Oh and if you are don’t forget returning a value from a field by field number) David Cox MindSource (UK) Limited Navision Solutions Partner Email: david@mindsource.co.uk Web: www.mindsource.co.uk

quote:


Oh and if you are don’t forget returning a value from a field by field number


Yeah, that would be fun:


objTable.Setrange(TableID,5000);
While objTable.Find('-') do begin
  file.write(objtable.fieldname +';'+ objtable.field(fieldno).value)
end;

------- With best regards from Switzerland Marcus Fabian

Hello, In a Card form it’s OK. And how to do this trick in Tabular type form ???