narek adonts Well-Known Member Licensed User Longtime User Mar 24, 2015 #1 Hi, Can someone help me to get the Rect for substring of text in Label? I want t create a label with clickable links. Narek Last edited: Mar 24, 2015
Hi, Can someone help me to get the Rect for substring of text in Label? I want t create a label with clickable links. Narek
Erel B4X founder Staff member Licensed User Longtime User Mar 25, 2015 #2 You can use String.MeasureWidth to find the width of the substring. Upvote 0
narek adonts Well-Known Member Licensed User Longtime User Mar 25, 2015 #3 It should work with multiline Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Mar 25, 2015 #4 It should work with multiline strings (strings with CRLF). Upvote 0
narek adonts Well-Known Member Licensed User Longtime User Mar 25, 2015 #5 I dont understand. If i want to manage clicks for a special word in a multima label, how String.measurewidth can help me. I need to know the top and left coordinates of the word to put a view on it. Narek Upvote 0
I dont understand. If i want to manage clicks for a special word in a multima label, how String.measurewidth can help me. I need to know the top and left coordinates of the word to put a view on it. Narek
B Brian Robinson Active Member Licensed User Longtime User Mar 26, 2015 #6 Not sure I understand what you want? Do you want a single label with multiple words in it that link to different places? Upvote 0
Not sure I understand what you want? Do you want a single label with multiple words in it that link to different places?
narek adonts Well-Known Member Licensed User Longtime User Mar 26, 2015 #7 i need a label to be able detect ex. Phone number, URL, Adress,... and manage clicks on it. if I will have the Rect of that string I can put a panel for example on it and manage clicks Narek Upvote 0
i need a label to be able detect ex. Phone number, URL, Adress,... and manage clicks on it. if I will have the Rect of that string I can put a panel for example on it and manage clicks Narek
narek adonts Well-Known Member Licensed User Longtime User Mar 26, 2015 #8 I managed to create an algorithm which checking which word is on which line but a got stuck on a word which is larger than the label width(is on multiple lines). If this last issue will be resolved we will have a full custom label Class which can handle clicks on specific string. Please see attached the project. Narek Attachments AttLabel.zip AttLabel.zip 1.8 KB · Views: 348 Upvote 0
I managed to create an algorithm which checking which word is on which line but a got stuck on a word which is larger than the label width(is on multiple lines). If this last issue will be resolved we will have a full custom label Class which can handle clicks on specific string. Please see attached the project. Narek