by the way...Tlabel has "paint" procedure, which is the equivalent procedure for a Tbutton? (or Tbitbtn)??so that I just override the paint procedure (without substituting all the bitbtns I've already placed in the form)...
Quote from: Blue1987 on September 18, 2011, 04:19:03 pmby the way...Tlabel has "paint" procedure, which is the equivalent procedure for a Tbutton? (or Tbitbtn)??so that I just override the paint procedure (without substituting all the bitbtns I've already placed in the form)...Right clic on the button > Change class > select TBGRAButton in 'New class' > then click on 'Remove all invalid properties'.
Quote from: lainz on September 18, 2011, 04:47:21 pmQuote from: Blue1987 on September 18, 2011, 04:19:03 pmby the way...Tlabel has "paint" procedure, which is the equivalent procedure for a Tbutton? (or Tbitbtn)??so that I just override the paint procedure (without substituting all the bitbtns I've already placed in the form)...Right clic on the button > Change class > select TBGRAButton in 'New class' > then click on 'Remove all invalid properties'.ehr, I haven't well explained what I meant. I have thousends bitbtns already in the form, I cannot do it thousands times So I would simply override the "paint" procedure for all Tbitbtn in the form...
xButton =TButton // change to xButton=TMyButton.
to override the paint procedure of the buttons (they are all bitbtn,
Quote from: Blue1987 on September 17, 2011, 04:29:17 pmto override the paint procedure of the buttons (they are all bitbtn, never override the paint event of tbutton, tbitbtn or in general any lcl standard windowed native control. this may work in Windows bit will not work in any other platform. Lazarus provides a series of non-native equivalents for standard controls here: wiki.lazarus.freepascal.org/Lazarus_Custom_Drawn_Controls
Quote from: felipemdc on September 18, 2011, 08:44:44 pmQuote from: Blue1987 on September 17, 2011, 04:29:17 pmto override the paint procedure of the buttons (they are all bitbtn, never override the paint event of tbutton, tbitbtn or in general any lcl standard windowed native control. this may work in Windows bit will not work in any other platform. Lazarus provides a series of non-native equivalents for standard controls here: wiki.lazarus.freepascal.org/Lazarus_Custom_Drawn_Controlsthank you... btw, how can I say to lazarus (somewhere in the unit1, I guess): "all bitbtn in the form are not tbitbtn anymore but become customdrawn_button"?or bgra_buttons?
Try to open the .lfm with a text editor and replace 'TButton' with 'TBGRAButton' or 'TCDButton'.Depending on the new button properties when you open the form you will need to press the 'remove unused prop..' for each button.