LordZenzo Well-Known Member Licensed User Longtime User Mar 8, 2020 #1 if I have a label of height 20 and set a font.size = 70 I expect the writing to come out of the label b4j, rightly (perhaps), resize the height to display all the text pity that the values of Height and PrefHeight do not reflect the real height
if I have a label of height 20 and set a font.size = 70 I expect the writing to come out of the label b4j, rightly (perhaps), resize the height to display all the text pity that the values of Height and PrefHeight do not reflect the real height
Erel B4X founder Staff member Licensed User Longtime User Mar 9, 2020 #2 Label.Height (not B4XView.Height) should return the real height when it is available. However you can also measure it with B4XCanvas or use BBLabel. Upvote 0
Label.Height (not B4XView.Height) should return the real height when it is available. However you can also measure it with B4XCanvas or use BBLabel.
LordZenzo Well-Known Member Licensed User Longtime User Mar 9, 2020 #3 Erel said: Label.Height (not B4XView.Height) should return the real height when it is available. Click to expand... ok, and when is it available? or better, how to make sure it is available? what is it BBLabel? Upvote 0
Erel said: Label.Height (not B4XView.Height) should return the real height when it is available. Click to expand... ok, and when is it available? or better, how to make sure it is available? what is it BBLabel?
Erel B4X founder Staff member Licensed User Longtime User Mar 9, 2020 #4 LordZenzo said: what is it BBLabel? Click to expand... Search Results www.b4x.com It is available after the JavaFX engine finished to build the layout. There is no event that will help you. This is exactly why B4XView.Height returns PrefHeight in the case of labels. Upvote 0
LordZenzo said: what is it BBLabel? Click to expand... Search Results www.b4x.com It is available after the JavaFX engine finished to build the layout. There is no event that will help you. This is exactly why B4XView.Height returns PrefHeight in the case of labels.
LordZenzo Well-Known Member Licensed User Longtime User Mar 9, 2020 #5 I'm using bblabel, added by designer pity that when I use them, it tells me that they are not initialized, but if I initialize them it tells me that I should not do it because they are added by designer ?!?! Upvote 0
I'm using bblabel, added by designer pity that when I use them, it tells me that they are not initialized, but if I initialize them it tells me that I should not do it because they are added by designer ?!?!
LordZenzo Well-Known Member Licensed User Longtime User Mar 9, 2020 #6 Erel said: It is available after the JavaFX engine finished to build the layout. Click to expand... this is also not true always returns the same value even after the label is initialized, visible and used I know because I check its size well after the layout is complete Upvote 0
Erel said: It is available after the JavaFX engine finished to build the layout. Click to expand... this is also not true always returns the same value even after the label is initialized, visible and used I know because I check its size well after the layout is complete
Erel B4X founder Staff member Licensed User Longtime User Mar 9, 2020 #7 LordZenzo said: pity that when I use them, it tells me that they are not initialized, but if I initialize them it tells me that I should not do it because they are added by designer ?!?! Click to expand... You didn't add them correctly. However you haven't provided enough information to help you. LordZenzo said: this is also not true always returns the same value even after the label is initialized, visible and used I know because I check its size well after the layout is complete Click to expand... Maybe you caught my lying. Post an example. Upvote 0
LordZenzo said: pity that when I use them, it tells me that they are not initialized, but if I initialize them it tells me that I should not do it because they are added by designer ?!?! Click to expand... You didn't add them correctly. However you haven't provided enough information to help you. LordZenzo said: this is also not true always returns the same value even after the label is initialized, visible and used I know because I check its size well after the layout is complete Click to expand... Maybe you caught my lying. Post an example.
LordZenzo Well-Known Member Licensed User Longtime User Mar 9, 2020 #8 unfortunately I'm rewriting everything from scratch but maybe I discovered the problem in some outdated libraries I have BCTextEngine vers 1.52 Upvote 0
unfortunately I'm rewriting everything from scratch but maybe I discovered the problem in some outdated libraries I have BCTextEngine vers 1.52
LucaMs Expert Licensed User Longtime User Mar 9, 2020 #9 Erel said: This is exactly why B4XView.Height returns PrefHeight in the case of labels. Click to expand... I haven't found any documentation regarding PrefWidth and PrefHeight, except for something (insufficient for me) on JavaFX CSS Reference Guide, so I don't know what they are. If I start an empty project, with Main default size 600x600, the log of sizes returns Width 600 and PrefWidth -1 (same for height). [I thought there were specific booklets for the 4 platforms but that's not the case] Upvote 0
Erel said: This is exactly why B4XView.Height returns PrefHeight in the case of labels. Click to expand... I haven't found any documentation regarding PrefWidth and PrefHeight, except for something (insufficient for me) on JavaFX CSS Reference Guide, so I don't know what they are. If I start an empty project, with Main default size 600x600, the log of sizes returns Width 600 and PrefWidth -1 (same for height). [I thought there were specific booklets for the 4 platforms but that's not the case]