I got a UserControl and some comboboxes in it. When I set new font for the UserControl, the font in comboboxes were also changed (this is expected) but the texts in them were selected!!
How can I prevent text selection in comboboxes?
Hope to find some solution soon.
Thanks in advance!
maybe you can post your xaml here.
If your bindings have something like this:
IsSynchronizedWithCurrentItem="True"
change it to false to prevent text selection.
Related
I have some VB6 controls that I have placed on a frame OCX that I have created myself. The issue, is when the frames are made visible, sometimes the controls (in this example 2 comboboxes) are missing, and you can see the background color of the Form through it.
The Usercontrol, is just 2 images with gradients, and a label for the title.
Are there any settings for UserControls that I need to know about that will fix this?
EDITED
AutoRedraw: True
Clip Controls: True
Clip Controls had to be set to False. Fixed me whole problem. Thanks for the answers though
1) Make sure that your container usercontrol have AutoRedraw=true and ClipControls=true
2) Add the following code to your container usercontrol:
Private Sub UserControl_Paint()
Refresh
End Sub
Set your background images as
backgroundimage.zorder 1
And your controls
combobox1.zorder 0
You can do this at runtime. I think your combo boxes are pushed back behind your image in the Z-Order. This is similar to the "Bring to front" and "push to back" options you have at design time.
When a Dialog is shown then the background of screen is darkened. I want to remove this darkness so that the screen looks like normal. How to achieve that ?
When you show a Dialog the background becomes a Form, changing its style you can modify the background of a Dialog. I don´t really know if you can make this Form transparent. I use the LWUIT-Theme creator and modifiying the Form´s style, I can change the background for an image o for one colour.
Try it here!
http://lwuit.java.net/
Set the tint color of the parent form, you can also set this in the look and feel class and within the theme constants in the resource editor.
just add below code on your dialog:
dialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
i am looking for highlighting function for so many days and there are no valid answers for it, so i am sorry to post this similar question again. Thanks in advance.
I am loading a word document in iphone webview, and now by default i am able to select/copy and paste the text, i wondering is there a way to highlight the text i selected using my finger and change the background color of that text ?
thanks very much if anyone can help me out.
No, it is not possible with public API. Non-HTML content is static when displayed in a UIWebView.
i want be able to select any color i want, just like the attached pic.
yes i want to learn this c++ or mfc . I find it more powerfull . Could u explain to me exactly how to add it to my project. I also want the color iteslf and it code appers in picture box and textbox.
Thanks
Use CColorDialog class in mfc is used to pick the color from mfc
// Get the selected color from the CColorDialog.
CColorDialog dlg;
if (dlg.DoModal() == IDOK)
{
COLORREF color = dlg.GetColor();
}
This sample will popup dialog to select the color and after selecting the color and click ok button then color variable will contain the selected color.
Use this color in your application.
EDIT
You can customize your combo box or list box to add the color pick tool.
Refer this link : CodeProjectSample
CMFCColorDialog is what you seem to be looking for. To make it act like a drop-down, you'll need to position it below the down-arrow button (e.g., using MoveWindow).
Since you don't seem to have the MFC Feature Pack, check the Ultimate Toolbox at http://www.codeproject.com/KB/MFC/UltimateToolbox.aspx. Its Graphical User Interface classes have a Color Picker.
For Visual Studio versions prior 2008, you can use BCGSoft's color pikcer (http://www.bcgsoft.com). MFC color dialog is based on this one.
I had a similar problem with CMFCColorButton. I added the graphic resource with the ToolBox on my dialog design, but I could't assign a control variable because it did not recognize CMFCColorButton.
The answer was to include afxcolorbutton.h in the header of stdafx.h. Maybe you can fix it in the same way.
I hope this helps
How to set the Z-Index of a Label control in Code?
I could see the option in XAML's property, but in code, I can't find something like:
Label1.SetZIndex // don't have this..
I looked through the Intellisence option, but I found nothing related to Z-index.
I am placing a Label on a TextBox.
use Canvas.SetZIndex