custom-controls

Resizing custom user control according to data in the webBrowser control docked in it

可紊 提交于 2019-11-28 00:27:29
I have a webBrowser control named webBrowser1 that is added and docked as DockStyle.Full on a custom user control. The web-browser accepts some HTML text dynamically and displays it. I disabled the scroll bars of the webBrowser control. My problem is that whenever the content is somewhat lengthy, the webBrowser hides it from below. But the requirement of my project objective is that the webBrowser must not show either scroll bars or it should not hide some of the content. The content must be completely shown as it is without scrolling. That means the user control on which the webBrowser is

flip coordinates when drawing to control

怎甘沉沦 提交于 2019-11-27 23:49:43
I am drawing a graph on a control, but 0,0 is at the top-left hand corner of the control. Is there a way to flip the coordinates so that 0,0 is at the lower left corner of the control? If you are using WinForms, then you might find that you can flip the Y-Axis using Graphics.ScaleTransform : private void ScaleTransformFloat(PaintEventArgs e) { // Begin graphics container GraphicsContainer containerState = e.Graphics.BeginContainer(); // Flip the Y-Axis e.Graphics.ScaleTransform(1.0F, -1.0F); // Translate the drawing area accordingly e.Graphics.TranslateTransform(0.0F, -(float)Height); //

Dispatcher throws InvalidOperationException on Messagebox.Show in Textchanged event

帅比萌擦擦* 提交于 2019-11-27 23:41:37
First of all this is the errorlog entry on my error crash program @ 15-9-2011 15:01:30error:System.InvalidOperationException: Dispatcher processing has been suspended, but messages are still being processed. at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) Anyway code: private void TB_postcode_cijfers_TextChanged(object sender, TextChangedEventArgs e){ if (TB_postcode_cijfers.Text != string.Empty || TB_postcode_cijfers.Text.Length > 0) { LBL_postcode.Content = Postcode_cijfers + Postcode_letters; if (TB_postcode_cijfers

Design-time package fails to build - File not found: 'Graphics.dcu'

大憨熊 提交于 2019-11-27 23:30:42
In Delphi XE2, I have a single control in a pair of design/run time packages. Originally, everything was working fine. I've built each of them many times already. Suddenly without warning, the design time package started complaining in one of my units that the Graphics unit is missing when I build. Graphics is a standard unit, but it's not found from this one place. I haven't even made any changes to this unit, and as far as I know, any changes that could affect this. Here's just the uses at the top (interface) of this unit: uses Graphics, ColorConv, Classes, Dialogs, ZLib; As you can see, it

Disable changes on seekbar by client

早过忘川 提交于 2019-11-27 22:02:52
I have a SeekBar that will change the progress when I require it to, but I don't want the user to be able to change it manually. I tried to set the SeekBar as this: <SeekBar android:id="@+id/seekBar1" android:layout_width="match_parent" android:layout_height="65dp" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" android:layout_marginTop="78dp" android:progress="10" android:max="100" android:clickable="false" android:thumb="@drawable/transparent" android:progressDrawable="@drawable/customprogressbar" /> But it doesn't work. How can I do this? That's more or less an

ASP.NET Custom Control - Unknown server tag

萝らか妹 提交于 2019-11-27 21:30:00
问题 I've made a custom control that inherits from a Literal control. When I try and use my control on a page a parsing error is thrown. I've added this to my web.config <configuration> <system.web> <pages> <controls> <add tagPrefix="one" namespace="myApplication.Controls"/> </controls> </pages> </system.web> </configuration> And I've added this to my page <%@ register namespace="myApplication.Controls" tagprefix="one" %> Neither of these have fixed the issue. I have a external assembly with some

BlackBerry - Custom menu toolbar

丶灬走出姿态 提交于 2019-11-27 20:55:46
I'm a beginner in BlackBerry programming, I need to replace in my application the default menu (when you press the menu button) by a custom menu, horizontal. The best to describe is I want the same result as the WeatherEye application for BlackBerry... alt text http://www.blackberrybing.com/resource/pics/201002/WeatherEye-OS-45.jpg I know how to create the default menu, but this one I have no idea! Thank you, Maksym Gontar What you will need to do is: create SizebleVFManager (contentManager) as an extension of VerticalFieldManager set display width and height = (display height - menu height)

How to get location of mouse in JavaFX?

别说谁变了你拦得住时间么 提交于 2019-11-27 20:53:31
I am a beginner in java(fx). How do you get the mouse location in x and y in JavaFX? I tried using AWT's MouseInfo (also imported it), but it's not working. I also saw the code for it in Ensembles(that dragging the ball-window in "advanced stage", that's what I need to do, drag my undecorated JavaFX stage), but it also doesn't work. I am using FXML with controller, and I guess that's the main problem. Should I switch back to the single-file simple JavaFX? I know FXML is better for laying out the UI, but I can't get many of such codes to work. Or do I need some other sort of code for my

How to use standard attribute android:text in my custom view?

心已入冬 提交于 2019-11-27 18:16:45
I wrote a custom view that extends RelativeLayout . My view has text, so I want to use the standard android:text without the need to specify a <declare-styleable> and without using a custom namespace xmlns:xxx every time I use my custom view. this is the xml where I use my custom view: <my.app.StatusBar android:id="@+id/statusBar" android:text="this is the title"/> How can I get the attribute value? I think I can get the android:text attribute with TypedArray a = context.obtainStyledAttributes(attrs, ???); but what is ??? in this case (without a styleable in attr.xml)? use this: public

How to make WPF wrappanel child items to stretch?

时光毁灭记忆、已成空白 提交于 2019-11-27 17:35:39
问题 I'd like to create an ItemsControl where child items are placed like a WrapPanel , but child Items should take as much space as it can. So that when the window size gets larger or smaller, the child items should stretch according to a certain width:height ratio. When the child items get added or removed from the ItemsControl 's ItemsSource , the WrapPanel should place linebreaks among items appropriately to keep child item's width:height ratio. Below is what I have so far. Is it possible to