Skip to content
This repository has been archived by the owner on Dec 20, 2021. It is now read-only.

Frequently Asked Questions

Mammad edited this page Apr 10, 2021 · 12 revisions
Question Answer
What does this library do? This library helps you create an interface for your program. Instead of writing 2000 lines of code, write 500 lines of code.
When I want to compile, I get an error TFT_WHITE was not declared in this scope. What am I doing wrong? You may be using an old version of MCUFRIEND_kbv. Please update it to at least 2.9.8. Currently, you cannot use color constants before the library #include statement, for example for page_backColors. If the issue persists, open an issue.
I get this message when I want to compile: MCUFRIEND_kbv.h: No such file or directory. What should I do? You haven't installed MCUFRIEND_kbv library. Install it using library manager or download it from here
I get this message when I want to use changeButtonProperty(): call of overloaded 'changeButtonProperty(int, int, int, unsigned int)' is ambiguous Pass a dummy argument with the same type as the value to the function, for example changeButtonProperty(0,0,BACK_COLOR,TFT_RED,0);. You can use any number instead of the last zero. Documentation
When I want to compile, I get Default argument given for .... What's The problem? Your C++ compiler does not have the -fpermissive flag. Open file explorer and go to %USERPROFILE%/AppData/Local/Arduino15/Packages/arduino/hardware/ and select the platform you are using. Then select the highest number and open platform.txt. In the text file, find compiler.cpp.flags and add -fpermissive at the end of the line and save the file.
What is a button/label/check-box/slider's index? The index is the number of the element in that page. The first element in the page's index is 0, second is 1 They are used to identify elements. These numbers are returned from the function that registers that element.
Several buttons with same size but different texts are shown with different font sizes. How can I tell it to make them all of one font size? Gui900 makes font size of buttons as large as possible, and telling it not to do this is not currently supported. But you can add spaces before and after text to make text longer, so the library decreases font size. Using this method, you can have the same text size for all your buttons.