custom-controls

Using Custom Colored Cursors in a C# Windows Application

十年热恋 提交于 2019-11-26 23:08:58
I am developing a SDG (Single Display Groupware) application, and for that I need multiple cursors (to the simplest of different colors) for the single window. I came to know that with C# you can just use black and white cursors, which does not solve my problem. So please help me with this problem. Thanks in advance. The Cursor class is rather poorly done. For some mysterious reason it uses a legacy COM interface (IPicture), that interface doesn't support colored and animated cursors. It is fixable with some fairly ugly elbow grease: using System; using System.ComponentModel; using System

Custom UITableViewCell programmatically using Swift

非 Y 不嫁゛ 提交于 2019-11-26 22:19:46
问题 Hey all I am trying to create a custom UITableViewCell , but I see nothing on the simulator. Can you help me please. I can see the label only if I var labUserName = UILabel(frame: CGRectMake(0.0, 0.0, 130, 30)); but it overlaps the cell. I don't understand, Auto Layout should know the preferred size/minimum size of each cell? Thanks import Foundation import UIKit class TableCellMessages: UITableViewCell { var imgUser = UIImageView(); var labUserName = UILabel(); var labMessage = UILabel();

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

一曲冷凌霜 提交于 2019-11-26 21:43:00
问题 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

Embedded HTML control for Blackberry?

瘦欲@ 提交于 2019-11-26 21:40:31
问题 Is there any api for viewing html content from w/in your blackberry application? To be clear, I don't mean launching the browser on top of my app to view a page. But rather rendering the page w/in my app. 回答1: Yes. Check out the net.rim.device.api.browser.field package or the Blackberry Browser section of application integration. Everything sort of finishes here: Field field = browserContent.getDisplayableContent(); See: JDE 4.0.0 API for the package RIM app integration guide Signed only api,

flip coordinates when drawing to control

谁说我不能喝 提交于 2019-11-26 21:35:35
问题 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? 回答1: 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

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

不问归期 提交于 2019-11-26 21:28:53
问题 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

Disable changes on seekbar by client

你离开我真会死。 提交于 2019-11-26 20:52:43
问题 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

BlackBerry - Custom menu toolbar

ⅰ亾dé卋堺 提交于 2019-11-26 20:29:55
问题 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, 回答1: What you will need to do is: create SizebleVFManager (contentManager) as an

How to get location of mouse in JavaFX?

ぐ巨炮叔叔 提交于 2019-11-26 20:28:41
问题 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

Android - custom UI with custom attributes

折月煮酒 提交于 2019-11-26 18:21:18
I know it is possible to create custom UI element (by way of View or specific UI element extension). But is it possible to define new properties or attributes to newly created UI elements (I mean not inherited, but brand new to define some specific behavior I am not able to handle with default propertis or attributes) e.g. element my custom element: <com.tryout.myCustomElement android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Element..." android:myCustomValue=<someValue> /> So is it possible to define MyCustomValue ? Thx Yes. Short guide: 1. Create an