Subject Re: Font Selection
From Mervyn Bick <invalid@invalid.invald>
Date Fri, 6 Sep 2019 09:41:58 +0200
Newsgroups dbase.getting-started

On 2019-09-06 12:27 AM, Ivan Benttini wrote:

>   I give up, all I want to do is change the last name of a field in any record in the table in use to BOLD when it is NOT but programmatically, can you show mw how?

Text in a field of a table can't be saved BOLD.  You will need to make
the contents of specific fields bold when you display the data.

Data can only be displayed in BOLD on a form in a text, entryfield or
editor object or in a report in a text object. It can't be displayed in
BOLD in a grid object.

To display the text in bold in an entryfield you will heed to use the
form query rowset's onNavigate event handler.

    function rowset_onNavigate(type, nRows)
       if this.fields['salary'].value >= 1000
          this.parent.parent.entryfield2.fontbold := true
           this.parent.parent.entryfield2.fontbold := false

Rowset event handlers don't understand form so you can't use

    form.entryfield2.fontbold := true

In the event handler

this is the rowset
this.parent is the query
this.parent.parent is the form

In a report you would use the the value displayed for the salary to set
the fontbold property of the text object that displays the lastname.

An example form and report are in the attached zip file.  The lastname
is displayed BOLD where the salary is equal to or greater than 1000.


PKJ&O+SY bold_text.repXmo0̤_ؐICRKS6J!dp8xn^ڦ)kD|~G;sw=1L11 'O?x(P0 <6_{'l         G݀/'RepDє84,;# spB9cD˄H˥[e*ݪ7zWg}[i@o޺tˆLԊ7  u0Db.Eghl̬B#R0FMxB`{̘o        _l9 S l@~1IDЭ L)Xf4S%bD0B|>Uw:E1#IV.QE2T4){8 F=v}r<nUYZD6YĵN9ǖ嘭B|"2MPU        ;q %-ߥ1&v/^2gE;mj94.v{ebnv,C/e!M2b\.< ndܕ_qcU 梟FU<)nr~)i4BcqE ߥ-ڦYJS6tVF֥ )w7g\L#M&ta@hQT'^Kr*6{ 9V؞k)<_[fc~Yg71RHlɸ$AAV~-X[&4YJYa"E(ϜW6 m!x_ 6j,s۱ 'A U>gׇݐ[гgWݑ䝬)NA r RLî/Q-ZvZXfU^T9sg        A{xHH2B*T$\Mm8c8N8d &\TyYIL~޲`_Wɒ:cymk\1i]C) QIVʺ,UrL:՟FV:sNrXqV[r,KͼAjql,^+;g22wdISYHZLPK=K&Of bold_text.wfmUko0BH*%)ЇIR cjIbqg;/ CjsεJPBd% v!b
-j<h6\.ԡKPqp/DAO4v-KJXs,Mi}м% EqYꑪ{yf̋&-16$*eD|.!]p%6%MQMcls y        Hjy        b1bKڬ+ǵtX        2uELbv0*bt;ɤ0Xc4}^dzk9F[a4Umb(z_JM/s<͘Fi=)aS]VSٰow5gяYPXk43b#<4:Я4j^covbz v7`Jf=)S*ц> e]\L'߿Dd<6ELl] &HEW+s.9R:gӻ(W kxb?[kw~şJ }mg/ZZiNf+_&?2>.st^/pG=qTTJ)J=o{2 5K߯xT|        B 5S-i*֟{՟(InA_PK?J&O+SY $ bold_text.rep jd Fd)!dPK?=K&Of $ ~bold_text.wfm <dPSd 1Td^2{dPK