{{tag>category:"OpenInsight 32-Bit" author:"Matthew Watson" author:"dbakke@srpcs.com's Don Bakke"}} [[https://www.revelation.com/the-works|Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community]] ==== Change Font Color in Edit Line Problem? (OpenInsight 32-Bit) ==== === At 16 OCT 2009 09:42:09AM Matthew Watson wrote: === I have version 7.3 and running on XP I have an issue with changing the color font in an edit line. The problem is that i have the text red in one edit line until the number entered in another edit line is greater than or equal to a set number already chosen from another screen. So i have the program change the color inside the Changed section of the edit line. it works fine for the very first key stroke changing it to red then any other keystroke after this changes it back to black and will never go back to red unless i restart the program. The program is going into the correct if statement i made sure by debugging it. So what is the trick... Below is the code. CaculateFund: fundinit=' fundnew=' fundinit=get_property(@window:'.FUND_INITIAL','TEXT') fundinit=iconv(fundinit,'MD2,') for i=1 to 3 ansi=' ansi=get_property(@window:'.SUSPENSE_NEW_':i,'TEXT') ansi=iconv(ansi,'MD2,') fundnew += ansi ansi=' ansi=get_property(@window:'.SUSPENSE_OLD_':i,'TEXT') ansi=iconv(ansi,'MD2,') fundnew += ansi next i fontstructure=get_property(@window:'.FUND_TOTAL','FONT') if fundnew GE fundinit then fontstructure=0 fontstructure=0 fontstructure=0 fontstructure=delete(fontstructure,1,1,16) end else fontstructure=255 fontstructure=0 fontstructure=0 fontstructure=delete(fontstructure,1,1,16) end retval=set_property(@window:'.FUND_TOTAL','FONT',fontstructure) retval=set_property(@window:'.FUND_TOTAL','TEXT',oconv(fundnew,'MD2,')) return ---- === At 16 OCT 2009 10:03AM dbakke@srpcs.com's Don Bakke wrote: === Matthew, I didn't look carefully for flaws in your logic but I'm wondering why you aren't using the INVALUE property when you first assign [i]fundinit[/i] and then repopulate the FUND_TOTAL control (as opposed to using the TEXT property and then using Iconv/Oconv). Also, instead of messing with the FONT property why don't you use the FORECOLOR property? dbakke@srpcs.com [url=http://www.srpcs.com]SRP Computer Solutions, Inc.[/url] [img]http://www.srpcs.com/srpicon1.gif[/img] ---- === At 16 OCT 2009 11:45AM Matthew Watson wrote: === Because I am new to this language and am used to VB6/VB.net2003. Where VB is a lot easier to program in at least with my experiance. There is very very little documentation in this language to help a beginner out. I did take a few classes but that just helps with a few basic things. My Rev History AREV31 for about 1.5 yrs OI 7.3 for 5 mnths converting arev to oi because of microsoft. But thanks for the forecolor property will check into that and did not know about the invalue property. ---- === At 16 OCT 2009 12:03PM dbakke@srpcs.com's Don Bakke wrote: === Matthew, I'm not sure what kind of class you took but we always recommend to our students to spend time reading through the Programmer's Reference Guide. Get familiar with the Properties, Events, and Stored Procedures. You don't have to memorize them but just get enough understanding so that when you come across a situation you might just recall that there's a Prop/Event/SSP for that! dbakke@srpcs.com [url=http://www.srpcs.com]SRP Computer Solutions, Inc.[/url] [img]http://www.srpcs.com/srpicon1.gif[/img] [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=WORKS_READ&SUMMARY=1&KEY=7FD8B6F7DA6D004F85257651004B4570|View this thread on the Works forum...]]