Page 1 of 3
button backcolor
Posted: Mon Nov 11, 2024 8:30 pm
by franco
I am trying to set the backcolor of a button.
Is this possible. I can do it with a label but setting the text of a label is harder.
Code: Select all
Define Button button_1
Row 60
Col 135
Caption 'Hello'
BackColor {72,255,72}
End Button
Thanks in advance
Re: button backcolor
Posted: Tue Nov 12, 2024 10:20 am
by serge_girard
Franco,
According to the DOCS there is no backcolor for buttons...
Re: button backcolor
Posted: Tue Nov 12, 2024 4:37 pm
by franco
Thanks Serge,
I am changing all my buttons to labels. It seems to work and gives my screens a brighter and more modern look.
Code: Select all
Define Label button_1 //change
Row 60
Col 135
Value 'Hello' //change
BackColor {72,255,72}
End Label //change
This way references stay same as names are still button
Re: button backcolor
Posted: Tue Nov 12, 2024 6:06 pm
by serge_girard
I did the same!
Re: button backcolor
Posted: Wed Nov 13, 2024 12:31 am
by jorge_riv
@ 10,Y BUTTONEX Bt_Exit WIDTH 139 HEIGHT 30 CAPTION "Exit" ;
ICON cImg FONTCOLOR BLACK SIZE 18 BOLD FLAT NOXPSTYLE ;
HANDCURSOR NOTABSTOP BACKCOLOR {{0.5,CLR_BLANCO, ;
CLR_NEGRO},{0.5,CLR_NEGRO,CLR_BLANCO}} GRADIENTFILL ;
{{0.5,CLR_ROJO,CLR_BLANCO},{0.5,CLR_BLANCO,CLR_ROJO}} ;
ON MOUSEHOVER ( This.Backcolor:=BLACK, ;
This.Fontcolor := WHITE,This.Icon := cIco, ;
This.ImageWidth := 45,This.ImageHeight := 45 ) ;
ON MOUSELEAVE ( This.Backcolor:=RED, ;
This.Fontcolor := BLACK,This.Icon := cImg, ;
This.ImageWidth := 45,This.ImageHeight := 45 ) ;
ACTION (IF(Salida_Color(),ThisWindow.Release, ;
This.Setfocus))
c_aTip := InitToolTipEx( This.Bt_Exit.Handle,," ",'Salida', 2,;
hb_bitOr(TTS_BALLOON,TTS_NOFADE),TTF_SUBCLASS)
PD: el bottom esta programado en: Harbour MiniGUI Extended Edition 24.06 (Standard)
Re: button backcolor
Posted: Wed Nov 13, 2024 7:15 pm
by mol
Labels work very fine, tou can use hover effect, you can also set alignment. i use them in a few of my applications. You can also set tabstop
Re: button backcolor
Posted: Thu Nov 14, 2024 10:10 am
by franco
Thanks Jorge,
This works good in minigui.
Is there a way to add minigui to hmg, I can not get it to work in hmg.
Like
#include <hmg.ch>
#include <minigui.ch>
DEFINE BUTTONEX BUTTON_1
BACKCOLOR{168,0,0}
END BUTTONEX
Re: button backcolor
Posted: Thu Nov 14, 2024 1:43 pm
by mol
I don't think it's possible to add buttoex to hmg in simple way
Re: button backcolor
Posted: Fri Nov 15, 2024 2:00 am
by franco
The label colors look so blaw, is there a way to living them up. Like dark edges and lighter in the middle.
Re: button backcolor
Posted: Fri Nov 15, 2024 8:31 am
by serge_girard
Perhaps you can use a picture or some image?