stevel05 Expert Licensed User Longtime User Jan 27, 2021 #1 I've just downloaded XUI Views 2.44, The XUIViewsUtils.CreateLabel method does not allow entry of an Event Name. Is this intended?
I've just downloaded XUI Views 2.44, The XUIViewsUtils.CreateLabel method does not allow entry of an Event Name. Is this intended?
LucaMs Expert Licensed User Longtime User Jan 27, 2021 #2 Also, you can create a panel using XUI.CreatePanel; why XUIViewsUtils.CreateLabel? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jan 27, 2021 #3 stevel05 said: Is this intended? Click to expand... Yes. 1. The click event is rarely needed. You can add a panel and put the label inside it. Or just don't use this method in the rare case where the event is needed. 2. XUIViewsUtils is a regular static code module. It is not possible to raise the event on a different module. LucaMs said: Also, you can create a panel using XUI.CreatePanel; why XUIViewsUtils.CreateLabel? Click to expand... It is much easier to update the B4X library, compared to updating the three native XUI libraries. It is also not possible to implement XUIViewsUtils.CreateB4XImageView from a a native library. Upvote 0
stevel05 said: Is this intended? Click to expand... Yes. 1. The click event is rarely needed. You can add a panel and put the label inside it. Or just don't use this method in the rare case where the event is needed. 2. XUIViewsUtils is a regular static code module. It is not possible to raise the event on a different module. LucaMs said: Also, you can create a panel using XUI.CreatePanel; why XUIViewsUtils.CreateLabel? Click to expand... It is much easier to update the B4X library, compared to updating the three native XUI libraries. It is also not possible to implement XUIViewsUtils.CreateB4XImageView from a a native library.
LucaMs Expert Licensed User Longtime User Jan 27, 2021 #4 Erel said: The click event is rarely needed. Click to expand... I think, instead, that many of us (me first) use labels as they were buttons. Erel said: It is much easier to update the B4X library, compared to updating the three native XUI libraries. It is also not possible to implement XUIViewsUtils.CreateB4XImageView from a a native library. Click to expand... ? Upvote 0
Erel said: The click event is rarely needed. Click to expand... I think, instead, that many of us (me first) use labels as they were buttons. Erel said: It is much easier to update the B4X library, compared to updating the three native XUI libraries. It is also not possible to implement XUIViewsUtils.CreateB4XImageView from a a native library. Click to expand... ?
Alexander Stolte Expert Licensed User Longtime User Jan 27, 2021 #5 LucaMs said: I think, instead, that many of us (me first) use labels as they were buttons. Click to expand... Me too, I rarely use buttons. Upvote 0
LucaMs said: I think, instead, that many of us (me first) use labels as they were buttons. Click to expand... Me too, I rarely use buttons.
Harris Expert Licensed User Longtime User Jan 28, 2021 #6 Erel said: You can add a panel and put the label inside it Click to expand... As I recall, this is what I had to do to allow the label (as button) to propagate to the click event. Extra code (in designer) and knowledge to get to the underlying ( panel - pane click) event... but it works... Designer gets a little crowded / confusing. If a panel / pane had (some of) the properties of a label (text and stuff), well then it would be a label? It "seems" it would be easier if there was a click event for a label, but what the heck do I know... Frankly - nuttin... I just gratefully use this amazing stuff. Upvote 0
Erel said: You can add a panel and put the label inside it Click to expand... As I recall, this is what I had to do to allow the label (as button) to propagate to the click event. Extra code (in designer) and knowledge to get to the underlying ( panel - pane click) event... but it works... Designer gets a little crowded / confusing. If a panel / pane had (some of) the properties of a label (text and stuff), well then it would be a label? It "seems" it would be easier if there was a click event for a label, but what the heck do I know... Frankly - nuttin... I just gratefully use this amazing stuff.
Erel B4X founder Staff member Licensed User Longtime User Jan 28, 2021 #7 Labels do have a click event (MouseClicked in B4J). This discussion is about a very small, cross platform, helper method that creates labels programmatically. Upvote 0
Labels do have a click event (MouseClicked in B4J). This discussion is about a very small, cross platform, helper method that creates labels programmatically.