- Jun 6, 2020
- 11,559
- 4,422
I was looking for resizable widget logic. Forum search gave me excellent sample, thanks to @Sagenut
[H3]
Not sure if this can be considered a Tutorial, my first attempt. Lately I started to play with Widgets, mostly for curiosity. The main problem I encountered was how to design the Layout to make it resizable and make the content to adapt automatically to size changes. Unluckily designing a widget...
In the given sample code, the 4x1 widget service code has 'label1_click' event.
I wanted to add 'label2_click' from the layout designer but got error message,
B4X:
Since 'label1_click' already exists in the code, I copy-pasted it as 'label2_click' and both works.
B4X:
Now my query is if by manually writing the click event we can achieve what is required, why the designer is giving error message ?
[H3]
برای دیدن لینک ها باید ثبت نام کنید
[/H3]Not sure if this can be considered a Tutorial, my first attempt. Lately I started to play with Widgets, mostly for curiosity. The main problem I encountered was how to design the Layout to make it resizable and make the content to adapt automatically to size changes. Unluckily designing a widget...
برای دیدن تصاویر باید ثبت نام کنید
برای دیدن لینک ها باید ثبت نام کنید
In the given sample code, the 4x1 widget service code has 'label1_click' event.
I wanted to add 'label2_click' from the layout designer but got error message,
B4X:
current module does not support layout events
برای دیدن لینک ها باید ثبت نام کنید
Since 'label1_click' already exists in the code, I copy-pasted it as 'label2_click' and both works.
B4X:
کد:
محتوای بلوک کدها در دسترس شما نیست. برای مشاهده بلوک کدها، وارد انجمن شوید یاثبت نام کنید
Now my query is if by manually writing the click event we can achieve what is required, why the designer is giving error message ?
برای دیدن لینک ها باید ثبت نام کنید