How do you get the max text length between or from each Label?

Or like this

1 Like

Yes, there are many solutions, it's just a matter of the programmer's imagination. Two codes from two different programmers will never be the same.

1 Like

"I understand that you want to select the longest text from the length of all labels?"

Yessss

But the labels are present already, I need that the "for each block " works with the "every label block", take the already present label, take it's length, put it in a list, (or if it's possible without the list function) and from this take the biggest number. And put this in a variable, or a label.... That I can work with this variable ..... Excuse if my explaining sometimes are a little bit unclear, but I am in learning....

Thanks

Ok, this seems to bi the solution to get the lengt of every label, then the next step will bi load the variable /list that contains the lengths and take the biggest of them?

The next two examples do this. Just use the "every label" block instead of "make a list".

Yes, I was trying, it works, it gives me the biggest length.

I read and was studying your examples (thanks so much) , before I understand, that this examples was indead the solutions... But now we have an other problem:

I can not use the variable in later calculations.... When I try to multiplicate it by itself, it flickers between the original result and the multiplied one.... Have you an explanation for this... I was put it in the clock....

If I understand it right, every time when the clock makes it's round, and the length is initialised, but initialised initialise to "0" then "Label1.text" is putted to "0" or the uncalculated Version of "Label1.text"?

Is this right? And when this is so, what we can do, to avoid it?

And a other thing what I was not seeing, because I'm not Master like you, indead we need this variable as a global variable... Because when I will use this "max-lenght-variable" in other parts of the program, then it is globally "0", I'm right?

"Local" means "private" (only for inside this block)?
"Global" then means "public", (for the complete program) like by java?

You see? I try to learn...

What we need sometimes it's a unclocked Version of this specific calculus, an then the possibility to save the variable, to reuse it, or this is achieved when we use the length variable as "global"?

Or the other solution suggested by myself, it's to put "intitialize.length" to "label1.text"? So that it have the variable everytime present, or by itself, or by calculation by "for each"?

Here I send you the "runtime Error" , if I try to put "label.text" instead o "0":

the operation > can not accept the arguments 5 text for label1

Or we use a "if block" to check If the number in "label1.text" = "length.variable" before change "Label1.text",

But for this we must save "label1.text" and load it from somewhere where we save it before?

this one is interesting too, this I will look in the Next time, when my head is smoking less
Don't delete it....
:joy::joy::joy::joy::+1::+1::+1::+1:

I am so thankful for your help here in the group... Thanks

And here I come just with this Problem,.... How I can n exclude certain labels from the every label search,

Or later how I can select certain label's from label 1 to 5 for example?

I know this is sometimes a new topic, sometimes, there exists a solution aleady?

Sometimes You know the topic that solves this issue? or the solution by the way? excuse that I ask?

Thanks for your patience

Label1 and Label2 are excluded from the search.

blocks - 2023-11-28T005914.078

I am ready now, and I want to load the image of my app here, I was making the block as image thing... But it will not load the image in here.... Is there an other way that I can send you my image about my app?

add.screenshot
to add a screenshot click here

Taifun

I was trying this, but it directly under the textbox where I write my replies, it was loading pass the 100% but then it brings a error notification, but the error notification was so fast, that I can not read it....

Ooooouuuuhhhh yeaaaHHHH..... NOW IT WORKS JIEHAHHH!!!!
Here are now my complete Programm.... Is not so much, but I has learned so much

Can I send the AIA file by this way to?
Later when I have my computer ready, then I can work more comfortably... :grinning::grinning::grinning:

Here it comeeeeessss!!!!
leftedge_copy.aia (21.0 KB)
Now I feeling like this crazy científics from the horror movie's....:grin::grin::joy::joy:
Sometimes it was needing Text to upload the files...

Now I have a other cuestion besides the list what is created in the initializing screen thing, this one:

How I can secure/ grab this to further use, for example, for later change the color or the time format, or something for example to have it as a global variable to...?

Maybe as a procedure:


Ok and the other NOT as a procedure ? I know, I m a little bad to you, but when I can get the complete cake of wisdom, why only take a piece, when I can get the complete cake ? :wink::wink:...

I'm ever make uncomfortable cuestions, I'm right ? ,:grin::grin::grin::grin:

"Complete cake of wisdom" is here :grin::

No, no, I mean only one of the other ways, step by step, that I can learn it, because that's my way to learn things... Step by step, by the other way I get confused and lost what I learned.... I will first know the way without procedures, later than, when I know the way without procedures, than I will look the way with procedures.... But first one then the next....

I've already shown you without procedures before, with procedures now.

Without :

With:

Yes, this is Cristal clear for me, but this solution is with procedures, and I ask if there is way without procedures..... And thanks for going really the way with me... You are a excellent teacher....

And now I ask how to use this list with the excluded labels, and if there is a way without procedures only .

Because now that I have all in this place, I will for example make this labels (but only the excluded labels) with a bigger fontsize. But I will in this process by the way optimize the programming (killing redundancies, make a little bit more order in the program, for a better reworking, but I must use only that what is in the program already, and try to Keep the program little..... And to have there only the tings that I was learning to this day ... (Order in my learnig)

I hope you excuse my explanation...

This things are actually already implemented in my Programm: wait I will send you the AIA file
leftedge_copy.aia (21.0 KB)

Here is it ...