RE: VFP Label Height changes
Good sleuthing Tracy! On 14 July 2021 16:14:32 GMT-04:00, Tracy Pearson wrote: >Crazy! > >I tracked down what was happening. >There is a caption_assign method on the base label class. >This is triggered before the init event. >The code in the caption_assign did not change the height of the label. >It >did adjust the width of a label. >When the width was adjusted the height would change, but there is not a >way >to capture that change and where it comes from. >I stepped through the code and never saw anything when I put an >height_assign method in there. > >So to correct this, I have to change the width of the label after the >form >has initialized. > >BINDEVENT(THISFORM, "INIT", THIS, "AFTER_FORM_INIT", 1) > >Awesome, it's working. > >Well, now I'm trying to launch a form that takes a parameter. > >Local nId >nId = 2547 >DO FORM TestForm with nId > >That errors with something that makes no sense. (Function argument >value, >type, or count is invalid.) > >DO FORM TestForm with 2547 > >That works without an error. > >Should I attempt to bind to the forms Show event? >Should I trigger something in the forms visible_assign code? > >I went with the visible_assign code today and the error isn't happening >anymore. > >So, if you need to resize something that needs to reference the parent >of an >object, don't do it in the child init method. Some properties don't >stay as >you suspect them to. > >Have Fun! >Tracy > > >-Original Message- >From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of >Tracy >Pearson >Sent: Friday, July 09, 2021 9:44 AM >To: profoxt...@leafe.com >Subject: RE: VFP Label Height changes > >Frank, > >I originally went down that path. Then I put some code in the INIT of >the >control on the form. >?PROGRAM(PROGRAM(-1)),"Height:",THIS.Height >DODEFAULT() > >That was when I decided I needed to figure out a hack to get around the >problem. If it is telling me the height of the control at the INIT was >17 >instead of 19 that was a problem. > >When I changed the Height to be overwritten to 19 in the cNavButton >class, >the above code correctly showed 19. >When I reset Height to default, it again showed 17. > >I spent a few hours attempting to reproduce it in a new project. I am >not >seeing the behavior currently. I'll may get some more time this weekend >to >continue my efforts. > > >Tracy > >-Original Message- >From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of >Frank >Cazabon >Sent: Thursday, July 08, 2021 10:48 AM >To: profoxt...@leafe.com >Subject: Re: VFP Label Height changes > >Tracy, > >you able to recreate this with base VFP controls and then maybe add in >your controls one by one to see where it's happening? > >Maybe there's some resizing code running or bindevents that does >something "special"? > >Frank. > >Frank Cazabon > >On 07/07/2021 4:46 pm, Tracy Pearson wrote: >> On cLabel and default everywhere used in this scenario. >> FontName: Segoe UI >> FontSize: 10 >> >> -Original Message- >> From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of >Richard >> Kaye >> Sent: Wednesday, July 07, 2021 4:40 PM >> To: profoxt...@leafe.com >> Subject: RE: VFP Label Height changes >> >> What is the default height for the font name and size used? >> >> -- >> >> rk >> >> -Original Message- >> From: ProfoxTech On Behalf Of Tracy >Pearson >> Sent: Wednesday, July 7, 2021 3:37 PM >> To: profoxt...@leafe.com >> Subject: RE: VFP Label Height changes >> >> Autosize = .F. >> Alignment is centered >> The Label class doesn't have IntegralHeight. >> >> >> Tracy >> >> -Original Message- >> From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of >Richard >> Kaye >> Sent: Wednesday, July 07, 2021 3:17 PM >> To: profoxt...@leafe.com >> Subject: RE: VFP Label Height changes >> >> Autosize? IntegralHeight? >> >> -- >> >> rk >> >> >> [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/a81ba8c7-8657-4e6f-98be-711185d78...@gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
RE: VFP Label Height changes
Crazy! I tracked down what was happening. There is a caption_assign method on the base label class. This is triggered before the init event. The code in the caption_assign did not change the height of the label. It did adjust the width of a label. When the width was adjusted the height would change, but there is not a way to capture that change and where it comes from. I stepped through the code and never saw anything when I put an height_assign method in there. So to correct this, I have to change the width of the label after the form has initialized. BINDEVENT(THISFORM, "INIT", THIS, "AFTER_FORM_INIT", 1) Awesome, it's working. Well, now I'm trying to launch a form that takes a parameter. Local nId nId = 2547 DO FORM TestForm with nId That errors with something that makes no sense. (Function argument value, type, or count is invalid.) DO FORM TestForm with 2547 That works without an error. Should I attempt to bind to the forms Show event? Should I trigger something in the forms visible_assign code? I went with the visible_assign code today and the error isn't happening anymore. So, if you need to resize something that needs to reference the parent of an object, don't do it in the child init method. Some properties don't stay as you suspect them to. Have Fun! Tracy -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Tracy Pearson Sent: Friday, July 09, 2021 9:44 AM To: profoxt...@leafe.com Subject: RE: VFP Label Height changes Frank, I originally went down that path. Then I put some code in the INIT of the control on the form. ?PROGRAM(PROGRAM(-1)),"Height:",THIS.Height DODEFAULT() That was when I decided I needed to figure out a hack to get around the problem. If it is telling me the height of the control at the INIT was 17 instead of 19 that was a problem. When I changed the Height to be overwritten to 19 in the cNavButton class, the above code correctly showed 19. When I reset Height to default, it again showed 17. I spent a few hours attempting to reproduce it in a new project. I am not seeing the behavior currently. I'll may get some more time this weekend to continue my efforts. Tracy -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Frank Cazabon Sent: Thursday, July 08, 2021 10:48 AM To: profoxt...@leafe.com Subject: Re: VFP Label Height changes Tracy, you able to recreate this with base VFP controls and then maybe add in your controls one by one to see where it's happening? Maybe there's some resizing code running or bindevents that does something "special"? Frank. Frank Cazabon On 07/07/2021 4:46 pm, Tracy Pearson wrote: > On cLabel and default everywhere used in this scenario. > FontName: Segoe UI > FontSize: 10 > > -Original Message- > From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Richard > Kaye > Sent: Wednesday, July 07, 2021 4:40 PM > To: profoxt...@leafe.com > Subject: RE: VFP Label Height changes > > What is the default height for the font name and size used? > > -- > > rk > > -Original Message- > From: ProfoxTech On Behalf Of Tracy Pearson > Sent: Wednesday, July 7, 2021 3:37 PM > To: profoxt...@leafe.com > Subject: RE: VFP Label Height changes > > Autosize = .F. > Alignment is centered > The Label class doesn't have IntegralHeight. > > > Tracy > > -Original Message- > From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Richard > Kaye > Sent: Wednesday, July 07, 2021 3:17 PM > To: profoxt...@leafe.com > Subject: RE: VFP Label Height changes > > Autosize? IntegralHeight? > > -- > > rk > > > [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/000601d778ec$dc6e4c70$954ae550$@powerchurch.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
RE: VFP Label Height changes
Frank, I originally went down that path. Then I put some code in the INIT of the control on the form. ?PROGRAM(PROGRAM(-1)),"Height:",THIS.Height DODEFAULT() That was when I decided I needed to figure out a hack to get around the problem. If it is telling me the height of the control at the INIT was 17 instead of 19 that was a problem. When I changed the Height to be overwritten to 19 in the cNavButton class, the above code correctly showed 19. When I reset Height to default, it again showed 17. I spent a few hours attempting to reproduce it in a new project. I am not seeing the behavior currently. I'll may get some more time this weekend to continue my efforts. Tracy -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Frank Cazabon Sent: Thursday, July 08, 2021 10:48 AM To: profoxt...@leafe.com Subject: Re: VFP Label Height changes Tracy, you able to recreate this with base VFP controls and then maybe add in your controls one by one to see where it's happening? Maybe there's some resizing code running or bindevents that does something "special"? Frank. Frank Cazabon On 07/07/2021 4:46 pm, Tracy Pearson wrote: > On cLabel and default everywhere used in this scenario. > FontName: Segoe UI > FontSize: 10 > > -Original Message- > From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Richard > Kaye > Sent: Wednesday, July 07, 2021 4:40 PM > To: profoxt...@leafe.com > Subject: RE: VFP Label Height changes > > What is the default height for the font name and size used? > > -- > > rk > > -Original Message- > From: ProfoxTech On Behalf Of Tracy Pearson > Sent: Wednesday, July 7, 2021 3:37 PM > To: profoxt...@leafe.com > Subject: RE: VFP Label Height changes > > Autosize = .F. > Alignment is centered > The Label class doesn't have IntegralHeight. > > > Tracy > > -Original Message- > From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Richard > Kaye > Sent: Wednesday, July 07, 2021 3:17 PM > To: profoxt...@leafe.com > Subject: RE: VFP Label Height changes > > Autosize? IntegralHeight? > > -- > > rk > > > [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/000c01d774c8$68a3b780$39eb2680$@powerchurch.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: VFP Label Height changes
Tracy, you able to recreate this with base VFP controls and then maybe add in your controls one by one to see where it's happening? Maybe there's some resizing code running or bindevents that does something "special"? Frank. Frank Cazabon On 07/07/2021 4:46 pm, Tracy Pearson wrote: On cLabel and default everywhere used in this scenario. FontName: Segoe UI FontSize: 10 -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Richard Kaye Sent: Wednesday, July 07, 2021 4:40 PM To: profoxt...@leafe.com Subject: RE: VFP Label Height changes What is the default height for the font name and size used? -- rk -Original Message- From: ProfoxTech On Behalf Of Tracy Pearson Sent: Wednesday, July 7, 2021 3:37 PM To: profoxt...@leafe.com Subject: RE: VFP Label Height changes Autosize = .F. Alignment is centered The Label class doesn't have IntegralHeight. Tracy -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Richard Kaye Sent: Wednesday, July 07, 2021 3:17 PM To: profoxt...@leafe.com Subject: RE: VFP Label Height changes Autosize? IntegralHeight? -- rk [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/d11e0b83-ed7a-ba9e-839b-ab17516f2...@gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
RE: VFP Label Height changes
There was no code in the Init of the subclass or form instances. I put that hack in the subclass, I followed it with a DODEFAULT(). Tracy -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Jan Bucek Sent: Wednesday, July 07, 2021 4:44 PM To: profoxt...@leafe.com Subject: Re: VFP Label Height changes DODEFAULT in Init? Dne 7.7.2021 v 22:40 Richard Kaye napsal(a): > What is the default height for the font name and size used? > > -- > > rk > > -Original Message- > From: ProfoxTech On Behalf Of Tracy Pearson > Sent: Wednesday, July 7, 2021 3:37 PM > To: profoxt...@leafe.com > Subject: RE: VFP Label Height changes > > Autosize = .F. > Alignment is centered > The Label class doesn't have IntegralHeight. > > > Tracy > > -Original Message- > From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Richard Kaye > Sent: Wednesday, July 07, 2021 3:17 PM > To: profoxt...@leafe.com > Subject: RE: VFP Label Height changes > > Autosize? IntegralHeight? > > -- > > rk > > > [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/005d01d77371$7efb8330$7cf28990$@powerchurch.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
RE: VFP Label Height changes
On cLabel and default everywhere used in this scenario. FontName: Segoe UI FontSize: 10 -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Richard Kaye Sent: Wednesday, July 07, 2021 4:40 PM To: profoxt...@leafe.com Subject: RE: VFP Label Height changes What is the default height for the font name and size used? -- rk -Original Message- From: ProfoxTech On Behalf Of Tracy Pearson Sent: Wednesday, July 7, 2021 3:37 PM To: profoxt...@leafe.com Subject: RE: VFP Label Height changes Autosize = .F. Alignment is centered The Label class doesn't have IntegralHeight. Tracy -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Richard Kaye Sent: Wednesday, July 07, 2021 3:17 PM To: profoxt...@leafe.com Subject: RE: VFP Label Height changes Autosize? IntegralHeight? -- rk [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/005c01d77371$2e403ee0$8ac0bca0$@powerchurch.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: VFP Label Height changes
DODEFAULT in Init? Dne 7.7.2021 v 22:40 Richard Kaye napsal(a): What is the default height for the font name and size used? -- rk -Original Message- From: ProfoxTech On Behalf Of Tracy Pearson Sent: Wednesday, July 7, 2021 3:37 PM To: profoxt...@leafe.com Subject: RE: VFP Label Height changes Autosize = .F. Alignment is centered The Label class doesn't have IntegralHeight. Tracy -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Richard Kaye Sent: Wednesday, July 07, 2021 3:17 PM To: profoxt...@leafe.com Subject: RE: VFP Label Height changes Autosize? IntegralHeight? -- rk [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/27d253a6-cdaf-eb8a-c45b-2cb695308...@post.cz ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
RE: VFP Label Height changes
What is the default height for the font name and size used? -- rk -Original Message- From: ProfoxTech On Behalf Of Tracy Pearson Sent: Wednesday, July 7, 2021 3:37 PM To: profoxt...@leafe.com Subject: RE: VFP Label Height changes Autosize = .F. Alignment is centered The Label class doesn't have IntegralHeight. Tracy -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Richard Kaye Sent: Wednesday, July 07, 2021 3:17 PM To: profoxt...@leafe.com Subject: RE: VFP Label Height changes Autosize? IntegralHeight? -- rk ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/dm5pr1001mb214099a764bb7a5c9751ce2cd2...@dm5pr1001mb2140.namprd10.prod.outlook.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
RE: VFP Label Height changes
Autosize = .F. Alignment is centered The Label class doesn't have IntegralHeight. Tracy -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Richard Kaye Sent: Wednesday, July 07, 2021 3:17 PM To: profoxt...@leafe.com Subject: RE: VFP Label Height changes Autosize? IntegralHeight? -- rk -Original Message- From: ProfoxTech On Behalf Of Tracy Pearson Sent: Wednesday, July 7, 2021 2:07 PM To: profoxt...@leafe.com Subject: VFP Label Height changes Maybe someone can tell me why this happens occasionally. I have a base label (cLabel) in class library A. I have a container (cNavButton) containing cLabel in class library B. I have another container (cNavGroup) that will contain cNavButton also in class library B. There is a form (frm1 (based on cForm in class library A)) that has the cNavGroup and 5 cNavButtons in it. cLabel has a height set to 19. cNavButton.cLabel is default The cNavGroup.cNavButton.cLabel.Height in frm1 all show they are still default (19). Yet I have placed code in the Init event of cLabel to display the Height onto the screen and I get 17. VFP can be so random sometimes. My hack to get around this behavior: in cNavButton, I have placed code in cLabel.Init to see if the height is < 19 and reset the height to default. [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/005001d77367$6e491cf0$4adb56d0$@powerchurch.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
RE: VFP Label Height changes
Autosize? IntegralHeight? -- rk -Original Message- From: ProfoxTech On Behalf Of Tracy Pearson Sent: Wednesday, July 7, 2021 2:07 PM To: profoxt...@leafe.com Subject: VFP Label Height changes Maybe someone can tell me why this happens occasionally. I have a base label (cLabel) in class library A. I have a container (cNavButton) containing cLabel in class library B. I have another container (cNavGroup) that will contain cNavButton also in class library B. There is a form (frm1 (based on cForm in class library A)) that has the cNavGroup and 5 cNavButtons in it. cLabel has a height set to 19. cNavButton.cLabel is default The cNavGroup.cNavButton.cLabel.Height in frm1 all show they are still default (19). Yet I have placed code in the Init event of cLabel to display the Height onto the screen and I get 17. VFP can be so random sometimes. My hack to get around this behavior: in cNavButton, I have placed code in cLabel.Init to see if the height is < 19 and reset the height to default. [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/dm5pr1001mb2140f84e056d4319e05b5359d2...@dm5pr1001mb2140.namprd10.prod.outlook.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
VFP Label Height changes
Maybe someone can tell me why this happens occasionally. I have a base label (cLabel) in class library A. I have a container (cNavButton) containing cLabel in class library B. I have another container (cNavGroup) that will contain cNavButton also in class library B. There is a form (frm1 (based on cForm in class library A)) that has the cNavGroup and 5 cNavButtons in it. cLabel has a height set to 19. cNavButton.cLabel is default The cNavGroup.cNavButton.cLabel.Height in frm1 all show they are still default (19). Yet I have placed code in the Init event of cLabel to display the Height onto the screen and I get 17. VFP can be so random sometimes. My hack to get around this behavior: in cNavButton, I have placed code in cLabel.Init to see if the height is < 19 and reset the height to default. ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/004b01d7735a$f0389590$d0a9c0b0$@powerchurch.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.