Author Topic: Inform 1.2 doesn't recognize the changement of color of label and doesn't adjour  (Read 7076 times)

0 Members and 1 Guest are viewing this topic.

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Hi Fellippe
trying to generate a rainbow effect to the text of a label I found this issue/bug/feature....

Enviroment:
 using Inform 1.2, QB64 1.5 in Windows 10.

Definition of issue:
 label is not adjourned if I change by code its forecolor, while the Inform 1.2 engine recognizes the changement of text (Caption) and / or font size


How to get this experience:
download the file attached to this thread and put its content into QB64 folder where surely you have already Inform installed. Otherwise run Inform and put a button, a label on the window. Then save the project and open it in QB64. Well create a variable bringing the TIMER value say Time, then in the section OnLoad  set caption(label) = " Can you see me changing color? "  and time = TIMER . Well now you go into CliCK section and under Button1 type  IF caption(llabel) = " Can you....... ? " THEN caption(label) = STR$(time), now you go to the BeforeDisplay section and write this code: IF TIMER - Time >0.5 THEN control(label).forecolor = _RGBA32( RND * 255, RND * 255, RND * 255, 255), Time = TIMER, END IF
It must be sufficient.

Well now compile and run.... you must got a window with a button with text Button1 and a label with text  " Can you see me changing color? " . The color of label doesn't change, but you can see the changement if your mouse across the area of the label.
Good, at this point you click the button1 and you can see the label changing continously a number showed and each time with a different color.

I think that when it is possible you can fix easily this issue.

Thanks to read and to try
* uno Inform.zip (Filesize: 4.56 KB, Downloads: 435)
Programming isn't difficult, only it's  consuming time and coffee

FellippeHeitor

  • Guest
Thanks for reporting, Tempo.

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
@FellippeHeitor
if you want wint AI you can see a little workaround using in combining changecolor of label and changesize of font of label.
Thanks to share Inform and to mantaining it.
Programming isn't difficult, only it's  consuming time and coffee