style(kEscStyle,?,?)
IT
it at plastipol.com
Mon Feb 28 08:18:20 UTC 2022
Hi Misha,
I think that style is for style (bold,italic,etc) but not for changing the font.
I’m using style() function in my reports. Some code samples look this in my reports:
Calculate lvTitulo2 as con(style(kEscStyle;kBold);'Periodo: ';style(kEscStyle;kPlain);pRow.f1;style(kEscStyle;kBold);' hasta ';style(kEscStyle;kPlain);pRow.f2)
Do ivFT.$add(con(style(kEscStyle;kItalic);ivCa.CAR_LINEA1;pick(isclear(ivCa.CAR_LINEA1);' ';'');ivCa.CAR_LINEA2;': ';style(kEscStyle;kPlain);ivCa.VCAR_VALOR;ivCa.VCAR_SIMBOLO;pick(ivCa.CAR_NUMERICO;'';jst(ivCa.LACA_VALORNUM;con('N';ivCa.CAR_DECIMALES)));' ';ivCa.UNCA_SIMBOLO;pick(isclear(ivCa.UNCA_SIMBOLO);'.';'')))
There are some tech notes that will help you in this matter.
https://www.omnis.net/developers/resources/support/newsletter/mar26_03.jsp# <https://www.omnis.net/developers/resources/support/newsletter/mar26_03.jsp#>
https://www.omnis.net/developers/resources/support/newsletter/apr16_03.jsp <https://www.omnis.net/developers/resources/support/newsletter/apr16_03.jsp>
https://www.omnis.net/developers/resources/technotes/tngi0002.jsp <https://www.omnis.net/developers/resources/technotes/tngi0002.jsp>
https://www.omnis.net/developers/resources/technotes/tngi0025.jsp <https://www.omnis.net/developers/resources/technotes/tngi0025.jsp>
And StudioTips speaks a little about style()
http://www.studiotips.net/docs/tips_gui/headedlists/all.html
Hope this will help you
regards
xavier
> El 27 feb 2022, a las 21:44, Mischa <mischa at omnislab.com> escribió:
>
> Hi Doug,
>
> thanks for your reply - yes, I use kEscBmp widely in my application, I however could not find an example how to use kEscStyle. Meanwhile it turned out that it is not suitable for my purpose - using a different font (e.g. Open Sans instead of Omnis System) as headline in the text run, so I did another approach that works but is not so elegant ;)
>
> best greetings and thanks
> Mischa
>
> -----Ursprüngliche Nachricht-----
> Von: omnisdev-en [mailto:omnisdev-en-bounces at lists.omnis-dev.com] Im Auftrag von Doug Easterbrook via omnisdev-en
> Gesendet: Sonntag, 27. Februar 2022 20:51
> An: OmnisDev List - English
> Cc: Doug Easterbrook
> Betreff: Re: style(kEscStyle,?,?)
>
> hi Mischa
>
> we use two variants of it a fair bit.
>
> for colour changes in text. the colours are generally the constants kred, kdarkred, kblack, kmagenta, kwhite etc. but I think you can define any colours using one of the colour functions
>
> I find that the 16 primary colour constants are enough to give distinction and using many shades of red (for example) …. don’t do anything to make much difference --
>
> style(kEscColor,kBlue)
>
>
>
>
> the other is icons. eg. kEscBmp
>
> style(kEscBmp,k16x16+10724)
>
>
> the constant k16x16 can be k32x32 and k48x84 and means the size of the icon
>
>
> the 10725 in an icon number from the built in omnis icons, of if you have defined any in #ICONS, you can access those too.
>
>
>
> there may be other kEsc xxxx options thet you can use like italic, underline, bold etc. in the editor, use kEsc and it will give you more examples.
>
>
>
> where can it be used.
>
> WE put it in a char variable in the first line of a headed list to colour the entire line
>
> also use it in $helptext at the bottom of the window to show totals of selected records . eg
>
> calc $cinst.$helptext as con(’ total credits ',style(kEscColor,kBlue),jst(iList.$totc(iList.credit)),style(kEscColor,kblack), ’total debits ..’etc)
>
> makes things stick out
>
>
>
> it doesn’t work in all text display fields (I wish it did). it may work in background objects
>
>
>
>
>
>
> Doug Easterbrook
> Arts Management Systems Ltd.
> mailto:doug at artsman.com
> http://www.artsman.com
> Phone (403) 650-1978
>
>> On February 27, 2022, at 8:59 AM, Mischa <mischa at omnislab.com> wrote:
>>
>> Dear all,
>>
>> I want to partially change the font and the font size within a kText bobj .
>>
>> I noticed there is an esc constant EscStyle, however the manual does not give a clue how to use it - obviously 2 additional parameters are accepted in the style() statement. Does anybody maybe know how to use style(EscStyle,?,?) and if it is possible to change the font for some parts of the text?
>>
>> Thanks a lot!
>> Mischa
>>
>> _____________________________________________________________
>> Manage your list subscriptions at https://lists.omnis-dev.com
>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
>
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
>
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
More information about the omnisdev-en
mailing list