Guenter Becker Active Member Licensed User Longtime User Jul 31, 2023 #1 Good Day Experts, in some Views like a combobox we can see a dropdown arrow aside an edittext. I know that I can create this by adding an edittext view and a label aside as childs of a panel. But I see also solutions like the ASActionEditText where a clickable text or character is placed inside the edit text. I think to do so is a more elegant way than using the panel solution. I like to get an example (B4A) that shows how to place a clickable character inside the edit text like the hint text. I think it goes the way to use a Java function but I have no Idea about it. Does anyone have an answer?
Good Day Experts, in some Views like a combobox we can see a dropdown arrow aside an edittext. I know that I can create this by adding an edittext view and a label aside as childs of a panel. But I see also solutions like the ASActionEditText where a clickable text or character is placed inside the edit text. I think to do so is a more elegant way than using the panel solution. I like to get an example (B4A) that shows how to place a clickable character inside the edit text like the hint text. I think it goes the way to use a Java function but I have no Idea about it. Does anyone have an answer?
toby Well-Known Member Licensed User Longtime User Jul 31, 2023 #2 Use csbuilder. The following code is to make a label text clickable. Adapt to your need for hint text B4X: Copy Dim cs As CSBuilder cs.Initialize.Size(30).Append("Some ").Append(CreateClickableWord("words")) cs.Append(" are ").Append(CreateClickableWord("clickable")).Append(".").PopAll Label1.Text = cs cs.EnableClickEvents(Label1) Upvote 0
Use csbuilder. The following code is to make a label text clickable. Adapt to your need for hint text B4X: Copy Dim cs As CSBuilder cs.Initialize.Size(30).Append("Some ").Append(CreateClickableWord("words")) cs.Append(" are ").Append(CreateClickableWord("clickable")).Append(".").PopAll Label1.Text = cs cs.EnableClickEvents(Label1)
Guenter Becker Active Member Licensed User Longtime User Jul 31, 2023 #3 toby said: Use csbuilder. The following code is to make a label text clickable. Adapt to your need for hint text B4X: Copy Dim cs As CSBuilder cs.Initialize.Size(30).Append("Some ").Append(CreateClickableWord("words")) cs.Append(" are ").Append(CreateClickableWord("clickable")).Append(".").PopAll Label1.Text = cs cs.EnableClickEvents(Label1) Click to expand... Hi, this is what I tried. But if you use it in an Edittext.Hint the click event is not fired! Upvote 0
toby said: Use csbuilder. The following code is to make a label text clickable. Adapt to your need for hint text B4X: Copy Dim cs As CSBuilder cs.Initialize.Size(30).Append("Some ").Append(CreateClickableWord("words")) cs.Append(" are ").Append(CreateClickableWord("clickable")).Append(".").PopAll Label1.Text = cs cs.EnableClickEvents(Label1) Click to expand... Hi, this is what I tried. But if you use it in an Edittext.Hint the click event is not fired!
LucaMs Expert Licensed User Longtime User Aug 1, 2023 #5 Guenter Becker said: But if you use it in an Edittext.Hint the click event is not fired! Click to expand... Of course, the hint text has no events, it disappears to allow user input! Upvote 0
Guenter Becker said: But if you use it in an Edittext.Hint the click event is not fired! Click to expand... Of course, the hint text has no events, it disappears to allow user input!