FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour REDEFINE SAY on Buttonbar
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: REDEFINE SAY on Buttonbar
Posted: Tue Dec 06, 2022 03:12 PM
You changed your look again! :-)
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: REDEFINE SAY on Buttonbar
Posted: Tue Dec 06, 2022 07:14 PM
Enrico,
Code (fw): Select all Collapse
   REDEFINE BUTTONBAR oBarInv ID 100 SIZE 60,55 OF oDiw 2015
          oBarInv:bClrGrad := aPubGrad
Adding this per your example:
Code (fw): Select all Collapse
    oDiw:oBarInv:bPainted = { || oDiw:oBarInv:Say( 5, 200, cIAMsg, , , , .T., .T. ) }
Creates an error: Message not found: TDIALOG:OBARINV

Also note, cIAMsg is a variable for the text to be displayed.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: REDEFINE SAY on Buttonbar
Posted: Tue Dec 06, 2022 08:16 PM
Enrico Maria Giordano wrote:You changed your look again! :-)
It is an AI created painting :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: REDEFINE SAY on Buttonbar
Posted: Tue Dec 06, 2022 08:18 PM

Dear Tim,

Instead of:

oDiw:oBarInv:bPainted = { || oDiw:oBarInv:Say( 5, 200, cIAMsg, , , , .T., .T. ) }

use:

oDiw:oBar:bPainted = { || oDiw:oBar:Say( 5, 200, cIAMsg, , , , .T., .T. ) }

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: REDEFINE SAY on Buttonbar
Posted: Tue Dec 06, 2022 08:21 PM
Antonio Linares wrote:
You changed your look again! :-)
It is an AI created painting :-)
Are you serious?
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: REDEFINE SAY on Buttonbar
Posted: Tue Dec 06, 2022 08:24 PM
Yes, using https://www.myheritage.es/ai-time-machine/all-results

Its really amazing. It requires ten fotos of yourself and then it starts creating all kind of paintings.

That one seemed to me a very good one :-)

AI is here more and more... ;-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: REDEFINE SAY on Buttonbar
Posted: Tue Dec 06, 2022 08:47 PM

Antonio,

I tried but it fails. The actual bar object is oBarInv

oBar does not exist so the error says there is no exported variable bPainted ...

Tim

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: REDEFINE SAY on Buttonbar
Posted: Tue Dec 06, 2022 10:19 PM
Try
Code (fw): Select all Collapse
oBarInv:bPainted = { || oBarInv:Say( 5, 200, cIAMsg, , , , .T., .T. ) }
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: REDEFINE SAY on Buttonbar
Posted: Tue Dec 06, 2022 10:55 PM

It doesn't show anything. It's not a huge problem, but I do see the REDEFINE SAY has limitations not found in @ ....SAY. Included in them is the inability to use a border.

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: REDEFINE SAY on Buttonbar
Posted: Tue Dec 06, 2022 11:07 PM

I was looking for a "cleaner" display ... but decided to go a different route.

I redefined my control from LTEXT to CTEXT and added the border to the resource ( in the .rc, WS_BORDER )

It looks decent and will work OK ...

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: REDEFINE SAY on Buttonbar
Posted: Wed Dec 07, 2022 09:31 AM
TimStone wrote:It doesn't show anything.
We need a code sample showing the problem in order to help you.
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: REDEFINE SAY on Buttonbar
Posted: Wed Dec 07, 2022 06:59 PM
Enrico,

Marc's example, as stated before, shows the exact problem.

It is a very simple problem.
1). You have a variable, ie. abc := "Test One", and you might change it to abc := "Test two" when executing a process in the program.
2). You have a button bar which is using a gradient background.
3). You want to display the content of the variable at some place on the button bar. It needs to be after the buttons.
4). You want the text to appear on the button bar without a background because you want the gradient to be uninterrupted.
5). Using a SAY command with a CTEXT control in an RC file, you get the text ( which changes as the variable is reset ).
6). The SAY command defaults to the Windows Style background that we are using rather than allowing the gradient background to show through.
7). The use of TRANSPARENT, no matter how it is implemented, does not work to achieve this objective.
8). If you look above the browse on Marc's example, you see the exact problem. The word Test has a background around it different than the dialog, and thus stands out.

As I said, I ended up just putting a border around it so it doesn't look as bad. It would be nice to have the ability to write text on a button bar where just the text is displayed and not the background.

For now, I will simply use my current display, and maybe at some point this can be addressed in FWH code.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: REDEFINE SAY on Buttonbar
Posted: Wed Dec 07, 2022 07:16 PM
TimStone wrote:Enrico,

Marc's example, as stated before, shows the exact problem.
I've already shown a workaround for that problem.
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: REDEFINE SAY on Buttonbar
Posted: Fri Dec 09, 2022 12:15 AM

I tried your workaround. However I am using RESOURCES for the control. It didn't work.

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit