I am working on VB6 environment.
I have a textbox whereby i need to change its background color based on my setting.inf file.
TextBox.BackColor = "&H00C0FFFF&"
I wanted to change it to this yellow color value(&H00C0FFFF&) but unable to get it working.
Any idea what is wrong?
resolved.
The value cannot be a string.
TextBox.BackColor = &H00C0FFFF&
Related
I am trying to change the color of the button in my Universal App.
This is the line:
Button.Background = new SolidColorBrush(Color.FromArgb(a,r,g,b));
But i get the error saying 'Color' does not exist in current context...
Do i need to include something or?
The Color is declared in Windows.UI;
I have two questions that you hopefully can help me with:
I'm struggeling with BorderBrush property and I need to be able to set it in code. It works if I do it like below but I need to give it a haxadecimal value (#ffcccccc) and can't figure out how to do it.
datePicker1.BorderBrush = (SolidColorBrush)Application.Current.Resources["PhoneAccentBrush"];
I have a datePicker and would like to give it a border color and set the background in the same way as my TextBox fields but I'm failing. What is the trick in modifying this control? I would prefer if I didn't have to use Blend.
Use Color.FromArgb
You have to customize the DatePicker template. This is of course, easiest done using Expression Blend. If you're clueless about XAML, I'll recommend you don't do custom control styles unless you have studied the subject more.
When I run my report from VS10, I have to switch everytime to print-layout. Because I need to make 100+ small adjustment to my big table, I have to press the print-layout button everytime to see the result.
Is there a way, I can set it up, so I start by seeing the print-layout when running the form?
It´s an old post but found the exact answer. Setting Print-Layout instead of setting Zoom mode for the ReportViewer.
ReportViewer1.SetDisplayMode(DisplayMode.PrintLayout)
It looks like you can adjust report viewer properties. I found a adjustment that sets the zoom, in your case (print layout = whole page) so the default would need to be changed.
Here is the VB script for it from MS.
'Declaration
<CategoryAttribute("Appearance")> _
<DefaultValueAttribute(ZoomMode.Percent)> _
Public Property ZoomMode As ZoomMode
'Usage
Dim instance As ReportViewer
Dim value As ZoomMode
value = instance.ZoomMode
instance.ZoomMode = value
I don't know if you have to use a # like value = 50 or if you can use value = Whole Page, it seems like the latter can be used since it bases the figures dimensions on the logical page to assume the view size.
Goood luck and check http://msdn.microsoft.com/en-us/library/microsoft.reporting.winforms.reportviewer.zoommode.aspx for further guidance and different code options.
Is there a way in IE to disable cell input inside grid and change it's color (so it won't be gray)?
Or Is there another way to disable an input - and not by changing it to "readonly"?
UPDATE:
I'm using inline editing , and my cell input is a regular simple input (editable:true, edittype:'text'). I want this input to be disabled but to changed it's text color to black when it is disabled.
Thank's In Advance.
The answer how to change the editable attribute temporary for some column before stating of editRow. In the way no input element will be created and you will not have toe problem which you try to solve.
Seems Janus doesn't think a developer might have a need to highlight the value of a single cell for the user...
It appears the SelStart & SelLength properties apply to the entire grid(wtf?)
I need to show a grid, and when the user enters the desired cell, to highlight the value for them for editing.. You know, highlight the value, start typing replaces the current value...
Should be like a simple txtBox.SelStart=0 & txtBox.SelLength=len(txtBox), But NO!!! Janus is WAY to smart for that...
Anyone out there smarter than Janus? Help!!
Thanks...
This works for me
GridEX1.SetFocus
GridEX1.Row = 2
GridEX1.Col = 3
GridEX1.EditMode = jgexEditModeOn
GridEX1.SelStart = 0
GridEX1.SelLength = 1000