Need to find RadButton in Radtreelist - radtreelist

I need to find a RadButton in Radtreelist, how to do this?
ContentPlaceHolder contentPage = Page.Master.FindControl("ContentPlaceHolder2") as
ContentPlaceHolder;
RadButton radbutton1 = (RadButton)contentPage.FindControl("RadButton1");

ContentPlaceHolder contentPage = this.Page.Master.FindControl("ContentPlaceHolder1") as ContentPlaceHolder;
RadButton R = sender as RadButton;
RadButton radbutton1 = R.Parent.FindControl("RadButton1") as RadButton;

Related

Is there a way to color console.log messages in WebStorm like dev tools?

Is there a way to color console.log messages in WebStorm like dev tools?
see image
Yes. You could do something like:
console.log('\x1b[36m%s\x1b[0m', 'I am cyan'); //cyan
%s is where in the string gets injected.
Colors reference
Reset = "\x1b[0m"
Bright = "\x1b[1m"
Dim = "\x1b[2m"
Underscore = "\x1b[4m"
Blink = "\x1b[5m"
Reverse = "\x1b[7m"
Hidden = "\x1b[8m"
FgBlack = "\x1b[30m"
FgRed = "\x1b[31m"
FgGreen = "\x1b[32m"
FgYellow = "\x1b[33m"
FgBlue = "\x1b[34m"
FgMagenta = "\x1b[35m"
FgCyan = "\x1b[36m"
FgWhite = "\x1b[37m"
BgBlack = "\x1b[40m"
BgRed = "\x1b[41m"
BgGreen = "\x1b[42m"
BgYellow = "\x1b[43m"
BgBlue = "\x1b[44m"
BgMagenta = "\x1b[45m"
BgCyan = "\x1b[46m"
BgWhite = "\x1b[47m"
Details: https://stackoverflow.com/a/41407246/2589276
No, it's not possible; styling console output is not supported. Please vote for WEB-12349 to be notified on any progress
worked for me like this:
var red = ['color: red'].join(';');
and to output:
console.log("%c I'm RED!",red)
EDIT: Works for me only in Chrome and Firefox

Change button background using button tag

I have setup 30 buttons and assigned them tags 1-30. I am looking for a way to use the tag so I can use a loop to change each of the 30 background colors. here is the way I have it setup but would like to use a loop.
Pb_Seg1.BackColor = Color.FromArgb(intRed(intStepNumber), intGreen(intStepNumber), intBlue(intStepNumber))
Pb_Seg2.BackColor = Color.FromArgb(intRed(intStepNumber), intGreen(intStepNumber), intBlue(intStepNumber))
Pb_Seg3.BackColor = Color.FromArgb(intRed(intStepNumber), intGreen(intStepNumber), intBlue(intStepNumber))
Pb_Seg4.BackColor = Color.FromArgb(intRed(intStepNumber), intGreen(intStepNumber), intBlue(intStepNumber))
Pb_Seg5.BackColor = Color.FromArgb(intRed(intStepNumber), intGreen(intStepNumber), intBlue(intStepNumber))
Here is the way I set them on an event handler using the tag
Private Sub Segment(sender As Object, e As EventArgs) Handles Pb_Seg99.MouseHover, Pb_Seg99.Click, Pb_Seg98.MouseHover, Pb_Seg98.Click, Pb_Seg97.MouseHover, Pb_Seg97.Click, Pb_Seg96.MouseHover, Pb_Seg96.Click, Pb_Seg95.MouseHover, Pb_Seg95.Click, Pb_Seg94.MouseHover, Pb_Seg94.Click, Pb_Seg93.MouseHover, Pb_Seg93.Click, Pb_Seg92.MouseHover, Pb_Seg92.Click, Pb_Seg91.MouseHover, Pb_Seg91.Click, Pb_Seg90.MouseHover, Pb_Seg90.Click, Pb_Seg9.MouseHover, Pb_Seg9.Click, Pb_Seg89.MouseHover, Pb_Seg89.Click, Pb_Seg88.MouseHover, Pb_Seg88.Click, Pb_Seg87.MouseHover, Pb_Seg87.Click, Pb_Seg86.MouseHover, Pb_Seg86.Click, Pb_Seg85.MouseHover, Pb_Seg85.Click, Pb_Seg84.MouseHover, Pb_Seg84.Click, Pb_Seg83.MouseHover, Pb_Seg83.Click, Pb_Seg82.MouseHover, Pb_Seg82.Click, Pb_Seg81.MouseHover, Pb_Seg81.Click, Pb_Seg80.MouseHover, Pb_Seg80.Click, Pb_Seg8.MouseHover, Pb_Seg8.Click, Pb_Seg79.MouseHover, Pb_Seg79.Click, Pb_Seg78.MouseHover, Pb_Seg78.Click, Pb_Seg77.MouseHover, Pb_Seg77.Click, Pb_Seg76.MouseHover, Pb_Seg76.Click, Pb_Seg75.MouseHover, Pb_Seg75.Click, Pb_Seg74.MouseHover, Pb_Seg74.Click, Pb_Seg73.MouseHover, Pb_Seg73.Click, Pb_Seg72.MouseHover, Pb_Seg72.Click, Pb_Seg71.MouseHover, Pb_Seg71.Click, Pb_Seg70.MouseHover, Pb_Seg70.Click, Pb_Seg7.MouseHover, Pb_Seg7.Click, Pb_Seg69.MouseHover, Pb_Seg69.Click, Pb_Seg68.MouseHover, Pb_Seg68.Click, Pb_Seg67.MouseHover, Pb_Seg67.Click, Pb_Seg66.MouseHover, Pb_Seg66.Click, Pb_Seg65.MouseHover, Pb_Seg65.Click, Pb_Seg64.MouseHover, Pb_Seg64.Click, Pb_Seg63.MouseHover, Pb_Seg63.Click, Pb_Seg62.MouseHover, Pb_Seg62.Click, Pb_Seg61.MouseHover, Pb_Seg61.Click, Pb_Seg60.MouseHover, Pb_Seg60.Click, Pb_Seg6.MouseHover, Pb_Seg6.Click, Pb_Seg59.MouseHover, Pb_Seg59.Click, Pb_Seg58.MouseHover, Pb_Seg58.Click, Pb_Seg57.MouseHover, Pb_Seg57.Click, Pb_Seg56.MouseHover, Pb_Seg56.Click, Pb_Seg55.MouseHover, Pb_Seg55.Click, Pb_Seg54.MouseHover, Pb_Seg54.Click, Pb_Seg53.MouseHover, Pb_Seg53.Click, Pb_Seg52.MouseHover, Pb_Seg52.Click, Pb_Seg51.MouseHover, Pb_Seg51.Click, Pb_Seg50.MouseHover, Pb_Seg50.Click, Pb_Seg5.MouseHover, Pb_Seg5.Click, Pb_Seg49.MouseHover, Pb_Seg49.Click, Pb_Seg48.MouseHover, Pb_Seg48.Click, Pb_Seg47.MouseHover, Pb_Seg47.Click, Pb_Seg46.MouseHover, Pb_Seg46.Click, Pb_Seg45.MouseHover, Pb_Seg45.Click, Pb_Seg44.MouseHover, Pb_Seg44.Click, Pb_Seg43.MouseHover, Pb_Seg43.Click, Pb_Seg42.MouseHover, Pb_Seg42.Click, Pb_Seg41.MouseHover, Pb_Seg41.Click, Pb_Seg40.MouseHover, Pb_Seg40.Click, Pb_Seg4.MouseHover, Pb_Seg4.Click, Pb_Seg39.MouseHover, Pb_Seg39.Click, Pb_Seg38.MouseHover, Pb_Seg38.Click, Pb_Seg37.MouseHover, Pb_Seg37.Click, Pb_Seg36.MouseHover, Pb_Seg36.Click, Pb_Seg35.MouseHover, Pb_Seg35.Click, Pb_Seg34.MouseHover, Pb_Seg34.Click, Pb_Seg33.MouseHover, Pb_Seg33.Click, Pb_Seg32.MouseHover, Pb_Seg32.Click, Pb_Seg31.MouseHover, Pb_Seg31.Click, Pb_Seg30.MouseHover, Pb_Seg30.Click, Pb_Seg3.MouseHover, Pb_Seg3.Click, Pb_Seg29.MouseHover, Pb_Seg29.Click, Pb_Seg28.MouseHover, Pb_Seg28.Click, Pb_Seg27.MouseHover, Pb_Seg27.Click, Pb_Seg26.MouseHover, Pb_Seg26.Click, Pb_Seg25.MouseHover, Pb_Seg25.Click, Pb_Seg24.MouseHover, Pb_Seg24.Click, Pb_Seg23.MouseHover, Pb_Seg23.Click, Pb_Seg22.MouseHover, Pb_Seg22.Click, Pb_Seg21.MouseHover, Pb_Seg21.Click, Pb_Seg20.MouseHover, Pb_Seg20.Click, Pb_Seg2.MouseHover, Pb_Seg2.Click, Pb_Seg19.MouseHover, Pb_Seg19.Click, Pb_Seg18.MouseHover, Pb_Seg18.Click, Pb_Seg17.MouseHover, Pb_Seg17.Click, Pb_Seg16.MouseHover, Pb_Seg16.Click, Pb_Seg15.MouseHover, Pb_Seg15.Click, Pb_Seg14.MouseHover, Pb_Seg14.Click, Pb_Seg13.MouseHover, Pb_Seg13.Click, Pb_Seg12.MouseHover, Pb_Seg12.Click, Pb_Seg11.MouseHover, Pb_Seg11.Click, Pb_Seg100.MouseHover, Pb_Seg100.Click, Pb_Seg10.MouseHover, Pb_Seg10.Click, Pb_Seg1.Click
Dim Segment As PictureBox = DirectCast(sender, PictureBox)
Segment.BackColor = Color.FromArgb(PatternColorsRed(ColorSelected), PatternColorsGreen(ColorSelected), PatternColorsBlue(ColorSelected))
' ColorSelected = (pb.Tag)
intRed(intStepNumber) = PatternColorsRed(ColorSelected)
intGreen(intStepNumber) = PatternColorsGreen(ColorSelected)
intBlue(intStepNumber) = PatternColorsBlue(ColorSelected)
End Sub
Resolved the issue. Setup picture array and cast each picture.
picturetest(0) = Pb_Seg1
picturetest(2) = Pb_Seg2
picturetest(3) = Pb_Seg2
for i=0 to 2
picturetest(i).BorderStyle = BorderStyle.Fixed3D
next

highchart display goal on mouse hover

Below is my code to display highcharts, now in the chart goal is showed on mouse over. i want to display it as thin line:
options.series[1] = new Object();
options.series[1].name = "Goal Points";
options.series[1].data = Goallimit;
options.series[1].type = 'arearange';
options.series[1].lineWidth = 0;
options.series[1].linkedTo = ':previous';
options.series[1].color = '#A6E685';
options.series[1].fillOpacity = 0.3;
options.series[1].zIndex = 0;!
Here is Highchart image

How do I create a XAML storyboard animation from C++\CX?

I've defined a Rectangle in the XAML named "MyRectangle" and when clicked I execute this code:
auto animation = ref new Windows::UI::Xaml::Media::Animation::DoubleAnimation();
animation->From = 0.01;
animation->To = 5.50;
animation->AutoReverse = true;
auto beginTime = Windows::Foundation::TimeSpan();
beginTime.Duration = 0;
animation->BeginTime = beginTime;
auto duration = Windows::Foundation::TimeSpan();
duration.Duration = 20000*1000;
animation->Duration = duration;
auto storyboard = ref new Windows::UI::Xaml::Media::Animation::Storyboard();
auto scaleTransform = ref new Windows::UI::Xaml::Media::ScaleTransform();
MyRectangle->RenderTransform = scaleTransform;
storyboard->SetTargetProperty(animation, "(Rectangle.RenderTransform).(ScaleTransform.ScaleX)");
storyboard->SetTarget(animation, MyRectangle);
storyboard->SetTargetName(animation, "MyRectangle");
storyboard->SpeedRatio = 1.0;
storyboard->Begin();
However, nothing happens. What am I doing wrong?
You must add the "animation" (or more animations) to the "storyboard" childrens:
storyboard->Children->Append(animation);
This is the C# equivalent:
https://learn.microsoft.com/en-us/uwp/api/windows.ui.xaml.media.animation.storyboard

VB.Net Image is not Showing at Runtime

Button image and icon is not showing at runtime
Button Image
Me.wibtnAdd.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton
Me.wibtnAdd.DisabledImagesGrayScale = False
Me.wibtnAdd.Enabled = False
Me.wibtnAdd.Image = CType(resources.GetObject("wibtnAdd.Image"), System.Drawing.Image)
Me.wibtnAdd.ImageFixedSize = New System.Drawing.Size(24, 24)
Me.wibtnAdd.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top
Me.wibtnAdd.Location = New System.Drawing.Point(53, 302)
Me.wibtnAdd.Name = "wibtnAdd"
Me.wibtnAdd.Shape = New DevComponents.DotNetBar.RoundRectangleShapeDescriptor(2)
Me.wibtnAdd.Size = New System.Drawing.Size(61, 52)
Me.wibtnAdd.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled
Me.wibtnAdd.TabIndex = 8
Me.wibtnAdd.Text = "Add"
Form Icon
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
to make your code more clear : 1) get rid of the 'Me'
2) use a 'With' clause
(i edited)
the issue seems to be in your access to resources : are you sure
you have a resource named "wibtnAdd.Image" ? it seems 'strange'
that it has same name as your object/property... Check your
wibtnAdd.Image, it might be Nothing. Same for your Icon.
Btw why not doing this in xaml ?? it would be much more readable,
and you can edit everything while seeing results.