Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Textbox Suggestion.

  1. #1
    Join Date
    Feb 2009
    Location
    Queens, NY, NY
    Posts
    7,429

    Default Textbox Suggestion.

    Can we please edit the default TextBox.dfo to add the font_size property and the label property IN THE RIGHT ORDER.
    this works fine.
    Code:
     
     Object oTextBox1 is a TextBox
            Set Location to 91 136
            Set FontPointHeight to 20 // must be set BEFORE the label value is set. 
            Set Label to 'This is pre-release software.  Not for production use. '
            Set FontWeight to fw_Bold
            Set TextColor to clRed
        End_Object
    This however just totally makes a mockery of all of the auto-size functionality.
    Code:
     Object oTextBox1 is a TextBox
            Set Location to 91 136
            Set Label to 'This is pre-release software.  Not for production use. '
            Set FontPointHeight to 20  
            Set FontWeight to fw_Bold
            Set TextColor to clRed
     End_Object
    Last edited by Michael Mullan; 3-Dec-2019 at 09:20 AM. Reason: / code
    Michael Mullan.
    Danes Bridge Enterprises.

    ++++++++++++++++++++++++++++
    There is just today. Tomorrow is a concept
    that is mostly theoretical. -- GM Wylie
    ++++++++++++++++++++++++++++

  2. #2
    Join Date
    Feb 2009
    Location
    Hengelo, Netherlands
    Posts
    10,869

    Default Re: Textbox Suggestion.

    Michael,

    First: When I try this with 19.1 I don't see a problem. Both textboxes have the same text in the same size (see screenshot of code and running application)
    Second: If a change is needed it should be in the class and not in a template or wizard
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	2019-12-05_103822.jpg 
Views:	78 
Size:	176.6 KB 
ID:	13311  
    Regards,
    Data Access Worldwide
    Vincent Oorsprong

  3. #3
    Join Date
    Feb 2009
    Location
    Queens, NY, NY
    Posts
    7,429

    Default Re: Textbox Suggestion.

    the code you posted, is not the code I posted. Your code has "Set Size" explicitly. Mine does not.

    Setting the size in the studio by dragging the corners makes some strange size numbers, and also the control is supposed to "automatically" set the size.
    Michael Mullan.
    Danes Bridge Enterprises.

    ++++++++++++++++++++++++++++
    There is just today. Tomorrow is a concept
    that is mostly theoretical. -- GM Wylie
    ++++++++++++++++++++++++++++

  4. #4
    Join Date
    Feb 2009
    Location
    Somewhere in Vermont, USA - unless I'm not
    Posts
    11,085

    Default Re: Textbox Suggestion.

    Quote Originally Posted by Michael Mullan View Post
    the code you posted, is not the code I posted. Your code has "Set Size" explicitly. Mine does not.

    Setting the size in the studio by dragging the corners makes some strange size numbers, and also the control is supposed to "automatically" set the size.
    Unless Bold or a different font size has been set.
    Garret

    Time for an oldie but goodie:

    "If it ain't broke, you're not trying." - Red Green

  5. #5
    Join Date
    Feb 2009
    Location
    Queens, NY, NY
    Posts
    7,429

    Default Re: Textbox Suggestion.

    well, practically, it auto-sizes just fine, as long as the Fontsize is set before the label.

    Setting a different size also confuses the living daylights out of the studio too, hence trying to find the workaround.
    Michael Mullan.
    Danes Bridge Enterprises.

    ++++++++++++++++++++++++++++
    There is just today. Tomorrow is a concept
    that is mostly theoretical. -- GM Wylie
    ++++++++++++++++++++++++++++

  6. #6
    Join Date
    Feb 2009
    Location
    Somewhere in Vermont, USA - unless I'm not
    Posts
    11,085

    Default Re: Textbox Suggestion.

    What about fw_bold? Even that has never worked for me with autosize. Are you saying that if I set it before the label it'll work?
    Garret

    Time for an oldie but goodie:

    "If it ain't broke, you're not trying." - Red Green

  7. #7
    Join Date
    Feb 2009
    Location
    Queens, NY, NY
    Posts
    7,429

    Default Re: Textbox Suggestion.

    The magic is you have to set FontPointHeight BEFORE the label is set, after that it just works even with fw_bold.
    Michael Mullan.
    Danes Bridge Enterprises.

    ++++++++++++++++++++++++++++
    There is just today. Tomorrow is a concept
    that is mostly theoretical. -- GM Wylie
    ++++++++++++++++++++++++++++

  8. #8
    Join Date
    Feb 2009
    Location
    Somewhere in Vermont, USA - unless I'm not
    Posts
    11,085

    Default Re: Textbox Suggestion.

    That's the issue - I can't remember a time I ever set it - I usually just change bold or color.
    Garret

    Time for an oldie but goodie:

    "If it ain't broke, you're not trying." - Red Green

  9. #9
    Join Date
    Feb 2009
    Location
    Hengelo, Netherlands
    Posts
    10,869

    Default Re: Textbox Suggestion.

    Michael,

    I missed you removed the "Set Size" line which is automatically added to the control when creating it from the class palette.

    But, removed it now and it still makes no difference. I even tried with the cApplication property "pbUseWindowsFonts" to false

    Please create a working example workspace and attach it to a HDE ticket if it still bites you.
    Regards,
    Data Access Worldwide
    Vincent Oorsprong

  10. #10
    Join Date
    Feb 2009
    Location
    Queens, NY, NY
    Posts
    7,429

    Default Re: Textbox Suggestion.

    On your test system, is your screen magnification set to 100%?

    I use 150% on the right, and 100 on the left.

    -MM
    Michael Mullan.
    Danes Bridge Enterprises.

    ++++++++++++++++++++++++++++
    There is just today. Tomorrow is a concept
    that is mostly theoretical. -- GM Wylie
    ++++++++++++++++++++++++++++

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •