John Woodsmall Active Member Licensed User Longtime User Dec 4, 2016 #1 I have a simple problem: Code: Copy If Sounds.Text ="(TAP TO CHANGE) SOUND - ON" Then Sounds.Text = "(TAP TO CHANGE) SOUND - OFF" do_sound = "NO" Else Sounds.Text = "" Sounds.text = "(TAP TO CHANGE) SOUND - ON" do_sound = "YES" End If the "NO" becomes: "NOOFF" (with OFF overwriting the ON not replacing it. this is on a panel on a scroll view (this works on a simple textview) but not here on a extview on a panel.
I have a simple problem: Code: Copy If Sounds.Text ="(TAP TO CHANGE) SOUND - ON" Then Sounds.Text = "(TAP TO CHANGE) SOUND - OFF" do_sound = "NO" Else Sounds.Text = "" Sounds.text = "(TAP TO CHANGE) SOUND - ON" do_sound = "YES" End If the "NO" becomes: "NOOFF" (with OFF overwriting the ON not replacing it. this is on a panel on a scroll view (this works on a simple textview) but not here on a extview on a panel.
John Woodsmall Active Member Licensed User Longtime User Dec 4, 2016 #2 Note: This happens when: DrawLinesOnPanel(Panel2) Code: Copy CanvasHolder.drawline(0,setting_label.top-5,382,setting_label.top-5, Colors.RGB(127,176,0), 1) then can not over-write the text as above. Upvote 0
Note: This happens when: DrawLinesOnPanel(Panel2) Code: Copy CanvasHolder.drawline(0,setting_label.top-5,382,setting_label.top-5, Colors.RGB(127,176,0), 1) then can not over-write the text as above.
klaus Expert Licensed User Longtime User Dec 4, 2016 #3 Can you post a small project showing the problem. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Dec 4, 2016 #4 Are you using the canvas to add an underline to the text? There are simpler ways: https://www.b4x.com/android/forum/threads/class-richstring.48573/#content Upvote 0
Are you using the canvas to add an underline to the text? There are simpler ways: https://www.b4x.com/android/forum/threads/class-richstring.48573/#content
John Woodsmall Active Member Licensed User Longtime User Dec 4, 2016 #5 Here is the setting page on my app. The problem is with the "Sound On" button. Off over-writes "On" on the screen. as you can see. Attachments panel.zip panel.zip 223.7 KB · Views: 356 Upvote 0
Here is the setting page on my app. The problem is with the "Sound On" button. Off over-writes "On" on the screen. as you can see.
klaus Expert Licensed User Longtime User Dec 4, 2016 #6 The problem is the Canvas, it duplicates the content. Without the Canvas it works as expected. Instead of drawing lines with a Canvas you could add Panels with a height of 1 to show lines. Upvote 0
The problem is the Canvas, it duplicates the content. Without the Canvas it works as expected. Instead of drawing lines with a Canvas you could add Panels with a height of 1 to show lines.
John Woodsmall Active Member Licensed User Longtime User Dec 4, 2016 #7 How do i add the panels to the scrollview that is there? Also not clear the correct way to define the panels. Code: Copy NavControl.ShowPage(page11) ScrollView2.Panel.LoadLayout("page10") ScrollView2.ContentHeight = Panel2.Height ScrollView2.ContentWidth = Panel2.Width DrawLinesOnPanel(Panel2) Upvote 0
How do i add the panels to the scrollview that is there? Also not clear the correct way to define the panels. Code: Copy NavControl.ShowPage(page11) ScrollView2.Panel.LoadLayout("page10") ScrollView2.ContentHeight = Panel2.Height ScrollView2.ContentWidth = Panel2.Width DrawLinesOnPanel(Panel2)
Erel B4X founder Staff member Licensed User Longtime User Dec 4, 2016 #8 Why aren't you using CustomListView? Which layout are you trying to implement? Upvote 0
John Woodsmall Active Member Licensed User Longtime User Dec 4, 2016 #9 This is the menu i am trying to implement with the lines separating each text item and image. it worked fine as a scrollview/panel but now with the drawlines it does not let me correctly change the text in "Sound on" - "Sound - Off" example above. Attachments IMG_0902.PNG 206.6 KB · Views: 416 Upvote 0
This is the menu i am trying to implement with the lines separating each text item and image. it worked fine as a scrollview/panel but now with the drawlines it does not let me correctly change the text in "Sound on" - "Sound - Off" example above.
klaus Expert Licensed User Longtime User Dec 4, 2016 #10 Try this one: But as Erel suggested, CustomListView would be the better choice. Attachments panel1.zip panel1.zip 223.7 KB · Views: 340 Upvote 0