B basil99 Active Member Licensed User Longtime User Mar 6, 2013 #1 Hi! read a lot of posts here, but still have no idea how to solve a problem i meet. So, lets start 1) I have a Panel, a Label, array of Labels and a Button: Code: Copy Dim MyPanel As Panel Dim Title As Label Dim Captions( 10, 10 ) As Label '10 is a sample value Dim Push as button 2) All labels are inited with text values, colors, etc and added to MyPanel. When button Push is pressed, i need: a) change text value for Title Lable b) make some Captions label visible or invisible, change it color, text etc, depending on some conditions Code: Copy sub Push_Click ' x and y are Ints previously calculated Title.Text = "New Text" Captions( x, y ).Visible = False end sub By some reason this Title.Text = "New Text" works fine, but all of this Code: Copy Captions( x, y ).Visible = False or true Captions( x, y ).Enable = False or true Captions( x, y ).Color = Colors.RGB( 0,0,0 ) return "Programm paused" message on my phone So, what i'm doing wrong ? Any way to manage of this Labels array ? Thak you
Hi! read a lot of posts here, but still have no idea how to solve a problem i meet. So, lets start 1) I have a Panel, a Label, array of Labels and a Button: Code: Copy Dim MyPanel As Panel Dim Title As Label Dim Captions( 10, 10 ) As Label '10 is a sample value Dim Push as button 2) All labels are inited with text values, colors, etc and added to MyPanel. When button Push is pressed, i need: a) change text value for Title Lable b) make some Captions label visible or invisible, change it color, text etc, depending on some conditions Code: Copy sub Push_Click ' x and y are Ints previously calculated Title.Text = "New Text" Captions( x, y ).Visible = False end sub By some reason this Title.Text = "New Text" works fine, but all of this Code: Copy Captions( x, y ).Visible = False or true Captions( x, y ).Enable = False or true Captions( x, y ).Color = Colors.RGB( 0,0,0 ) return "Programm paused" message on my phone So, what i'm doing wrong ? Any way to manage of this Labels array ? Thak you
Erel B4X founder Staff member Licensed User Longtime User Mar 6, 2013 #2 Press F5 to see the actual error message in the logs. Upvote 0
Cableguy Expert Licensed User Longtime User Mar 6, 2013 #3 try loging the x and y values to see if they are correct and valid... Remember that you are using a 2 dimension array, so it can be tricky.... Upvote 0
try loging the x and y values to see if they are correct and valid... Remember that you are using a 2 dimension array, so it can be tricky....
B basil99 Active Member Licensed User Longtime User Mar 6, 2013 #4 Weird. Spent some time formatting and commenting code, then compile again and error gone, so all works fine. Have no idea what was wrong ) Upvote 0
Weird. Spent some time formatting and commenting code, then compile again and error gone, so all works fine. Have no idea what was wrong )