tufanv Expert Licensed User Longtime User Jan 6, 2015 #1 Hello I made a forum search but couldnt find a info. Color event is only for write i cant read the color of a panel. How can i get the background color of a panel ? ty
Hello I made a forum search but couldnt find a info. Color event is only for write i cant read the color of a panel. How can i get the background color of a panel ? ty
derez Expert Licensed User Longtime User Jan 6, 2015 #2 Define a canvas to the panel. Canvas.bitmap.getpixel..... Upvote 0
tufanv Expert Licensed User Longtime User Jan 6, 2015 #3 derez said: Define a canvas to the panel. Canvas.bitmap.getpixel..... Click to expand... Thank you for the answer. IS there any forum post to define a canvas to a panel or can you show a little example if possible ? I dont know what is to define a canvas to a panel ty Upvote 0
derez said: Define a canvas to the panel. Canvas.bitmap.getpixel..... Click to expand... Thank you for the answer. IS there any forum post to define a canvas to a panel or can you show a little example if possible ? I dont know what is to define a canvas to a panel ty
tufanv Expert Licensed User Longtime User Jan 6, 2015 #4 ok , I have initialized a canvas to panel. TY ! Upvote 0
derez Expert Licensed User Longtime User Jan 6, 2015 #5 Press b4a in this page menu above, select documentation index and then roll down to types and select canvas. Upvote 0
Press b4a in this page menu above, select documentation index and then roll down to types and select canvas.
tufanv Expert Licensed User Longtime User Jan 6, 2015 #6 derez said: Press b4a in this page menu above, select documentation index and then roll down to types and select canvas. Click to expand... Yep, I did the search. I have initialized canvas to each panel. But my problem is when i draw color to each canvas i lose the borders of the panel. It draws on everything. How can i keep the borders Upvote 0
derez said: Press b4a in this page menu above, select documentation index and then roll down to types and select canvas. Click to expand... Yep, I did the search. I have initialized canvas to each panel. But my problem is when i draw color to each canvas i lose the borders of the panel. It draws on everything. How can i keep the borders
derez Expert Licensed User Longtime User Jan 6, 2015 #7 Initializing the canvas to the panel does not draw on it, you can get the color of any pixel without changing the bitmap. Upvote 0
Initializing the canvas to the panel does not draw on it, you can get the color of any pixel without changing the bitmap.
tufanv Expert Licensed User Longtime User Jan 6, 2015 #8 derez said: Initializing the canvas to the panel does not draw on it, you can get the color of any pixel without changing the bitmap. Click to expand... ah got it now ty very much . ,I was drawing color on the panel. that was hiding the borders ! Upvote 0
derez said: Initializing the canvas to the panel does not draw on it, you can get the color of any pixel without changing the bitmap. Click to expand... ah got it now ty very much . ,I was drawing color on the panel. that was hiding the borders !
tufanv Expert Licensed User Longtime User Jan 6, 2015 #9 I have one more question. If i execute panel2.color = colors.white it also clears the borders altough they are set at designer. Why doesnt it just change the color of the panel but also clears the borders ? Upvote 0
I have one more question. If i execute panel2.color = colors.white it also clears the borders altough they are set at designer. Why doesnt it just change the color of the panel but also clears the borders ?
derez Expert Licensed User Longtime User Jan 8, 2015 #10 I guess that the designer is doing a series of operations like draw a color rectangle in the border's color, then a smaller rectangle in the selected panel color etc. When you draw it creates a new bitmap. Upvote 0
I guess that the designer is doing a series of operations like draw a color rectangle in the border's color, then a smaller rectangle in the selected panel color etc. When you draw it creates a new bitmap.
klaus Expert Licensed User Longtime User Jan 8, 2015 #11 To change the color with border you must use this code: Code: Dim cdw As ColorDrawable cdw.Initialize2(Color, Radius, BorderWidth, ColorBorder) Panel.Background = cdw Upvote 0
To change the color with border you must use this code: Code: Dim cdw As ColorDrawable cdw.Initialize2(Color, Radius, BorderWidth, ColorBorder) Panel.Background = cdw