Go Down

Topic: UTFT Button library and border problem (Read 833 times) previous topic - next topic

lenny1972

Nov 15, 2015, 09:10 pm Last Edit: Nov 15, 2015, 09:11 pm by lenny1972
Hi, I'm using the UTFT button library a week now but I'm stucked in a problem I cannot solve..
I want to draw buttons with no border but even if a set the button border to be the same colour of the screen background I always see a border around the button.. I've set in the "myButtons.setButtonColors" function both the border and the highlight values to the same colour of the screen background but with no results... Is there someone that succeded in drawing buttons without borders????
Any help is welcome

ghlawrence2000

You didn't show your code, so I cannot see where you have gone wrong!! But if you set the button colours before defining the buttons, and you set the 3rd parameter same as screen background, then there is no border.

Eg :-
Code: [Select]
  myButtons.setButtonColors(VGA_WHITE, VGA_GRAY, VGA_BLACK, VGA_RED, VGA_BLUE);
  but1 = myButtons.addButton( 10,  20, 300,  30, "Button 1");
  but2 = myButtons.addButton( 10,  60, 300,  30, "Button 2");


If you also want no border when the button is pressed, set the 4th parameter to screen background.

Regards,

Graham
UTFT_SdRaw now included in library manager!! ;) High speed image drawing from SD card to UTFT displays for Mega & DUE.
UTFT_GHL - a VASTLY upgraded version of UTFT_CTE. Coming soon to a TFT near you! 8) Shipping April 1 2016!

Go Up