Options

kolom Kleur

postacipostaci Member Posts: 116
edited 2009-07-10 in NAV Dutch speaking only
Beste mensen,

ik heb een form met veel kolommen.
Ik wil per kolom de kleur van de inhoud bepalen (Forecolor)
Ik heb de volgende code:
IF veld = 'Datum' THEN BEGIN
CurrForm.Datum.UPDATEFORECOLOR(integer);
END

Ik heb 2 velden aangemaakt namelijk veld en integer.
in Veld wordt de naam van het kolom gezet en in integer het nummer van de kleur,
voorbeeld:
veld = 'Datum'
integer = 255

Dan wordt het kolom Datum rood. dit is tot nu toe goed.
Alleen wil ik ook andere kolommen wijzigen van kleur.
Als ik de velden leeg haal om andere kolommen te wijzigen van kleur,
dan verlies ik het kleur van de gewijzigde kolom. Hij houdt het kleur niet vast.

Hoe moet ik dit oplossen?

Ander vraag: wat houdt dit in? --> CurrForm.Datum.UPDATEINDENT(220);
heeft dit hiermee te maken?

ik hoop dat ik snel een goede oplossing krijg :lol:

Akin

Comments

  • Options
    garakgarak Member Posts: 3,263
    UPDATEINDENT (Text Box)
    Use this function set the Indent property of a text box.

    UPDATEINDENT(Indent)
    Indent

    Data type: integer

    The indentation in 1/100 mm.

    Comments
    The Indent property can only be set by using this function from the OnFormat trigger of the text box - it cannot be set from the property sheet.

    The intended use is to provide some means of structuring information in a tabular form by indenting the contents of a text box, based on some notion of a hierarchy. See also the UPDATEFORECOLOR and UPDATEFONTBOLD functions which are meant to be used for similar purposes.

    Example
    You can use this function to indent a text box in a tabular form according to the value in some other field this:

    CurrForm.Name.UPDATEINDENT(Level * 220);

    The Level field is supposed to contain integer values from 0 and upwards. The higher this value is, the more indentation will be added to text box that displays the contents of the Name field.

    Example:

    Field Name starts at the begin of the Text box:
    Name: MY Name is
    
    with updateident(integer) it could look like this:
    Name:       MY Name is
    

    To the other question: Did i understood it correct, that you will set dynamicly the colour of the coloumns by using a "WhichFieldTextBox" and a "TheColorOfTheWichFieldTextBox" :?: And after you set Field DATUM you will set Field BESCHREIBUNG but the Field DATUM should not lost his color :?:

    Regards
    Do you make it right, it works too!
  • Options
    postacipostaci Member Posts: 116
    It can lose his color.
    i want to use 2 fields to say which column I want to change.
    2 fields ot use:
    Veld
    Kleur

    for example:
    Veld = 'Date'
    Kleur = 255

    If I do this I want that column 'Date' forecolor changes to 255. that's it.
    after I clear field Veld and Kleur it must stay as 255.

    clear?
  • Options
    garakgarak Member Posts: 3,263
    must it stay only for the time during this window is open or must it also be coloured if the user reopen this window (after press ESC and open it again) :?:

    If only during the window is open, u can use a array or a temptable where you store the colourvalues.

    Like field Date is Array[1], Field Description is Array[2] and so on....
    OnFormat()
    CurrForm.DateField.Updateforecolor(Array[1]);
    

    On the TextBox and Textbox with color u set the array.

    Also you can create a option variable where you define, for example, 10, colours. So the user doesn't need to type 255 or 0 or 344456. He select then GREEN, BROWN, and so on. You know RED is 255, BROWN is XYZ and Green is ABC ....

    Regards
    Do you make it right, it works too!
  • Options
    AdministratorAdministrator Member, Moderator, Administrator Posts: 2,496
    @garak, @postaci,

    Dit is het "NAV Dutch speaking only" forum, waar enkel postings in het Nederlands zijn toegelaten.

    Translated: This is the "NAV Dutch speaking only" forum, where only postings in Dutch are allowed.
  • Options
    ajhvdbajhvdb Member Posts: 672
    I think Garak can read dutch (like I can read German) and likes to help but isn't that good in writing it. Shouldn't be a problem if postaci keeps on writing in dutch.
  • Options
    AdministratorAdministrator Member, Moderator, Administrator Posts: 2,496
    Dan nog dient er hier in het Nederlands gepost te worden. Als men wil helpen zonder dat men het Nederlands machtig is, kan men altijd een Private Message sturen.
Sign In or Register to comment.