Page 2 of 3
Re: REDEFINE SAY on Buttonbar
Posted: Tue Dec 06, 2022 3:12 pm
by Enrico Maria Giordano
You changed your look again!
Re: REDEFINE SAY on Buttonbar
Posted: Tue Dec 06, 2022 7:14 pm
by TimStone
Enrico,
Code: Select all | Expand
REDEFINE BUTTONBAR oBarInv ID 100 SIZE 60,55 OF oDiw 2015
oBarInv:bClrGrad := aPubGrad
Adding this per your example:
Code: Select all | Expand
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.
Re: REDEFINE SAY on Buttonbar
Posted: Tue Dec 06, 2022 8:16 pm
by Antonio Linares
Enrico Maria Giordano wrote:You changed your look again!
It is an AI created painting
Re: REDEFINE SAY on Buttonbar
Posted: Tue Dec 06, 2022 8:18 pm
by Antonio Linares
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. ) }
Re: REDEFINE SAY on Buttonbar
Posted: Tue Dec 06, 2022 8:21 pm
by Enrico Maria Giordano
Antonio Linares wrote:Enrico Maria Giordano wrote:You changed your look again!
It is an AI created painting
Are you serious?
Re: REDEFINE SAY on Buttonbar
Posted: Tue Dec 06, 2022 8:24 pm
by Antonio Linares
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...
Re: REDEFINE SAY on Buttonbar
Posted: Tue Dec 06, 2022 8:28 pm
by Enrico Maria Giordano
Great!
Re: REDEFINE SAY on Buttonbar
Posted: Tue Dec 06, 2022 8:47 pm
by TimStone
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
Re: REDEFINE SAY on Buttonbar
Posted: Tue Dec 06, 2022 10:19 pm
by Enrico Maria Giordano
Try
Code: Select all | Expand
oBarInv:bPainted = { || oBarInv:Say( 5, 200, cIAMsg, , , , .T., .T. ) }
Re: REDEFINE SAY on Buttonbar
Posted: Tue Dec 06, 2022 10:55 pm
by TimStone
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.
Re: REDEFINE SAY on Buttonbar
Posted: Tue Dec 06, 2022 11:07 pm
by TimStone
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 ...
Re: REDEFINE SAY on Buttonbar
Posted: Wed Dec 07, 2022 9:31 am
by Enrico Maria Giordano
TimStone wrote:It doesn't show anything.
We need a code sample showing the problem in order to help you.
Re: REDEFINE SAY on Buttonbar
Posted: Wed Dec 07, 2022 6:59 pm
by TimStone
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.
. 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.
Re: REDEFINE SAY on Buttonbar
Posted: Wed Dec 07, 2022 7:16 pm
by Enrico Maria Giordano
TimStone wrote:Enrico,
Marc's example, as stated before, shows the exact problem.
I've already shown a workaround for that problem.
Re: REDEFINE SAY on Buttonbar
Posted: Fri Dec 09, 2022 12:15 am
by TimStone
I tried your workaround. However I am using RESOURCES for the control. It didn't work.