Questions tagged [uicontrol]

0

votes
0

answer
5

Views

Is there a way to make octave interpret strings in static text of uicontrol using TeX (Greek letters, subscripts, superscripts etc.)?

I am writing a GUI in GNU octave (5.1.0). It is supposed to read some input values, make some calculations, plot some graphs and write the results. Everything works well besides the unwanted fact that uicontrol displays the given string uninterpreted (Greek letters, subscripts, superscripts etc.). I...
Tomáš Hofer
1

votes
0

answer
54

Views

Changing UIButton borderColor in sync with title when highlighting

I have a custom UIButton with a border. I'd like the layer.borderColor to be in sync with the titleLabel when the button reacts to the user events - i.e. becomes Highlighted or Selected. Sometimes these events are animated with a delay, sometimes immediately. E.g.: Tap & Hold the button - Immediatel...
Richard Topchiy
1

votes
2

answer
30

Views

Add UIControl programmatically

I try a adding UITableView into scrollview programmatically. I have set anchors and datasource, delegate. You can see in codes. But I can't. I put a breakpoint and everything run. But I can't see in my scrollview. UITableView *tableView = [[UITableView alloc] init]; tableView.rowHeight = 130; tableV...
Adnan Ertörer
1

votes
1

answer
714

Views

How can a covered UIControl or UIView know about a touch event that ended above it?

I have a UIControl (or UIView, doesn't matter which) and this is covered by another UIControl. The other UIControl reacts nicely on touch events. However, the underlying UIControl also needs to know about the touch and if it was actually 'on it' or not from the user's perspective. The covering UICon...
1

votes
1

answer
347

Views

How to make the “hot area” of a UIControl bigger?

Or: How to expand the sensitive area for a UIControl without just making the view bigger? I have a pretty small button image (a little arrow), which is just 10 x 10 pixels. Too small for touching. I want the 'hot area' to be 50 x 50 around that. For learning, I want to know how to do it manually, ev...
1

votes
2

answer
762

Views

How do I have my UIViewController respond to a non-touch event?

Working with iPhone SDK 3.2 -- I have a complex custom UIControl that handles touches on the child controls. In certain cases, I want the parent UIControl to pass an event to the UIViewController, which will then take action outside the control. How do I do this cleanly? Thank you!
Elon
1

votes
1

answer
749

Views

The right way to manage subviews in a UIControl

(iPhone SDK 3.x:) I have a UIControl subclass that creates a different number of subviews depending on the length of an NSArray property. Please take my word for it that this needs to be a UIControl rather than a UIView. Currently I implement subview management in drawRect, beginning by removing a...
ed94133
1

votes
2

answer
646

Views

iPhone UIControlEvent when touches have ended

I have a volume slider in my application that I'd like to have a sound effect play when the user changes the value. The standard valueChanged event works well here, and I'd like to use it in conjunction with a touches ended signal to trigger the sound at the end. Is there a control event here that I...
MechEngineer
1

votes
1

answer
876

Views

How can I assign properties to a custom UIControl using Xcode 4 and iOS 4.3 outside of code?

I've got a custom button class which subclasses UIControl, and I can successfully add instances of it into my XIBs using Xcode 4. I can also use 'User Defined Runtime Attributes' in the Identity Inspector to give the buttons titles and font sizes, etc. However, this seems to only be supported in iO...
Doug McBride
1

votes
2

answer
2.5k

Views

Button changes title every time pressed

Im trying this, but when i press it it dont changes, it only displays text. Also tried if else functions, but with no results. .h IBOutlet UIButton *poga1; @property (nonatomic, retain) UIButton *poga1; .m @synthesize poga1; - (void)viewDidLoad { [super viewDidLoad]; [poga1 setTitle:@'My Title' for...
Edgars
1

votes
1

answer
865

Views

Matlab - can't display manually set axes

I create a figure and a panel of uicontrols. When I run the program, the panel overlays the default axes( or plot area if that is more appropriate). So, I want to have the panel at a certain position and the axes( or plot area) set at a separate position. I've read Matlab help and tried many variati...
vpap
1

votes
1

answer
1.1k

Views

matlab uicontrols

I made a gui and I have a code (thanks Amro) that shows me a gif file. I want to show this gif file in 'hAxes' till the gui is closed (show it with the other uicontrol). I have a folder that has 200 pictures (image1.jpg, image2.jpg... image200.jpg) and I perform some things about these images (in lo...
Alon Shmiel
1

votes
2

answer
1.5k

Views

How do I programmatically get the state of UIBarButtonItems?

With a UIControl such as a UIButton you can use something like myControl.state to figure out whether the control is currently being pressed down. However, I need to do the same with some UIBarButtonItems (which are not derived from UIControl), so that I can stop my table from editing while one of th...
Josh Wight
1

votes
1

answer
104

Views

where an internal dispatch table. in addTarget:action:forControlEvents:

http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIControl_Class/Reference/Reference.html#//apple_ref/occ/cl/UIControl addTarget:action:forControlEvents: Adds a target and action for a particular event (or events) to an internal dispatch table. I can't underStand the dispatch ta...
user1292717
1

votes
1

answer
814

Views

Matlab: Using values from multiple uicontrols to plot a graph

I am trying to combine values from several UI controls in order to select a particular graph output. Here's the code: First we open the figure: figure('position',[100 100 700 350]); Part 1: The Popup UI control input value: pullDown = uicontrol('style','popup',... 'position',[10 680 180 10],... 'str...
naxchange
1

votes
1

answer
483

Views

matlab design the uipanel

I want to show the image (path of file) and below to put the cells. Unfortunately, the image disappeared. this is the GUI with the image. I want the yellow cell will be below the image. this is the gui after my change: hFig = figure('Name','Step 3 of 4: Choose data for each image','Menubar','none',...
Alon Shmiel
1

votes
1

answer
1.2k

Views

Matlab text object carriage return issue + text outside graph

I'm trying to show some text on top of a plot. Using text(13,15200,('~ 12h'),'HorizontalAlignment','right','VerticalAlignment','middle','FontSize',10,'FontAngle','italic'); I can create the text box how I want it. But a thing I didn't manage to do is to create a carriage return within that text obje...
ranzbert
1

votes
1

answer
432

Views

Recognize tab button pressed to move to next responder

I have multiple instances of a custom class that takes inputs from keyboard. You can think of UITextField (but they are not UITextField, they are NSObject). However, they all have a property UIControl *control. These objects are instantiated and put into an array (orders matter), and they are put on...
Canopus
1

votes
1

answer
1.6k

Views

using tag attribute with a UIButton in the sender and trying to cast id -> UIButton

First time using tag attributes and wondering what I'm doing wrong here. I have two UIButtons that go to the same selector. I would like to add a tag to differentiate like this: buttonOne.tag=1; buttonTwo.tag=2; In the selector that responds, I'm trying to get this tag out of the sender but being to...
timpone
1

votes
1

answer
3k

Views

How to animate transition from one state to another for UIControl/UIButton? [duplicate]

This question already has an answer here: Fading out an UIButton when touched 1 answer I have a UIButton that changes image on highlight. When transitioning from UIControlStateHighlight to UIControlStateNormal, I want the highlighted image to slowly fade back into the normal image. Is there an ea...
Marty
1

votes
1

answer
744

Views

Detect touches on sublayer elements

I have MyCustomView view as subclass of the UIControl class. I draw stuff on my view like this: CAShapeLayer *line = [CAShapeLayer layer]; .... [self.layer addSublayer:line]; Is it anyway to detect touches on 'line' and do some work? For example move 'line'.
Roman Sudakov
1

votes
1

answer
557

Views

How to use a UIScrollview to create a thumb wheel with the dynamic speed?

UIThumbWheel I'm developing a wheel, like an old fashioned volume control, that sticks out of the side of a UIView and returns values. The issue I'm having is how to marry UIScrollView to the task while having the knob accelerate based upon the users speed of scrolling. For clarity my mock-up of th...
1

votes
1

answer
688

Views

Cannot call callback of the pushbutton of the uicontrol in matlab

I am trying to create a button in GUI matlab and call a function when it is pressed. This code it is not working. I have also tried to use these values in the last argument of uicontrol: fnHi, 'fnHi', 'fnHi();' The code is: function [] = testui() function fnHi() fprintf('hi'); end fnHiHandler = @fnH...
nsblenin
1

votes
2

answer
684

Views

ContinueTrackingWithTouch doesn't get called continuously

I am creating a subclass of UIControl and adding to my view controller's view - (BOOL) beginTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event; - (BOOL) continueTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event; - (void) endTrackingWithTouch:(UITouch *)touch withEvent:(UIEven...
jailani
1

votes
1

answer
220

Views

Why does my rotatable wheel control sometimes spin in the wrong direction?

I am making a rotatable wheel control. You can drag anywhere on it to spin the control by it's central point. It's not behaving correctly. It usually works well, but for some portion of a rotation, it starts rotating in the opposite direction for a brief period, and then it starts rotating with you...
E.A. Wilson
1

votes
2

answer
365

Views

How add background image to UIControl

I create 3rd party keyboard and i try add background to my keys. I use UIControl for my keys, without storyboard. I have several types of buttons and try to add background UIView for my characters. let img = UIImage(named:'KeyBackground') var bgImage: UIImageView? bgImage = UIImageView(image: img) b...
Ga77ett
1

votes
1

answer
288

Views

How to have custom UIControlState in Swift 2.2 using bit masks?

I have a custom UIButton with some unique states that I want it to have like: enum PositionControlState : Int { case Available = 0, Pending, Waiting, Approved, Declined } I've done a bit of Googling and found some stuff about bitmasks, and UIControlState.Application in objective-c. I feel like I hav...
eli_slade
1

votes
1

answer
597

Views

Make a custom class of UIPickerView able to send events in Swift

I've written a custom class based on UIPickerView. Within a class I implemented next method: func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) { let min = (selectedRow(inComponent: 0) % minutes.count) let sec = (selectedRow(inComponent: 1) % seconds.count...
Andrew V. Jackson
1

votes
1

answer
38

Views

How to debug into `MeasureOverride` of a UWP UI control

I am trying to find out the cells pacing used in the GridView control in UWP. I have tried setting the symbol server to Microsoft server and derived a class from GridView and overridden few virtual method. I was hoping that I would debug into the MeasureOverride. I am using visual studio 2017. Alter...
resp78
1

votes
1

answer
147

Views

ButtonDownFcn on uicontrol

My GUI has two edit boxes (uicontrol) and I would like to change their background color by left-clicking on it. For left-mouse click, the ButtonDownFcn works only if the uicontrol Enable property is set to 'inactive' or 'off', so I switch the property to make it work. By pressing the tab key, I woul...
oro777
1

votes
1

answer
0

Views

How can you mask a UIImage with a UIControl?

I can set a UIImage's mask property to another UIView, but if I set the UIImage's mask property to a UISwitch, the UIImage and UISwitch does not display. recordMicSwitch = UISwitch() guard let sc = recordMicSwitch else { return } sc.frame = CGRect(x: deviceWidth - sc.frame.size.width - rightMargin,...
Chewie The Chorkie
1

votes
1

answer
0

Views

How to darken a custom UIButton

I've subclassed the UIButton class and now a custom view will be drawn using quartz 2d. It all looks fine, but how can I darken the button at clicking it. How can I set the views for the different states if I am using quartz in the same class to draw the button? Thanks for your help
burki
1

votes
1

answer
0

Views

mixing OpenGL and Interface Builder/ UI Controls - bad idea? Why? (iPhone)

I've heard that OpenGL ES and standard iPhone UI controls don't play well together, but I'm wondering if anyone knows why, and what the effects are? I'm writing an OpenGL based game, and the view is loaded from a nib file with ui controls, and it seems to work ok, but the game is really simple at t...
Adam
1

votes
1

answer
0

Views

Creating custom button with multiple labels

Is it possible to create a button with multiple labels? e.g. imageView, textLabel and detailTextLabel. I don't think it's possible using interface builder, but maybe we can do it programmatically by adding the UIImage and UILabels to button's view. If i do write a custom UIButton class, what's the...
Mustafa
1

votes
1

answer
0

Views

How can I save and clear data entered into a MATLAB GUI?

For example, let's say I would like to design a GUI with a table that the user enters data into. I then want to have 2 push buttons: one that will save the data currently in the table, and another that will clear the data from the table. Are there any code examples/tutorials that explain in general...
raymond
1

votes
2

answer
0

Views

Sliding band-like UI control element for iOS and how do I mimic it?

The mobile edition of AP News has a sliding band type UI control that allows you to switch between 'Headlines', 'Most Recent' any number of other sections. It's akin to a sliding segment bar. Does anyone know how one would go about mimicking this? And is there a name for this type of control?
Jonas Anderson
1

votes
1

answer
0

Views

Can NSAttributedString be used to connect native app actions with the words?

I understand that NSAttributedString can be used for detecting hyperlinks and setting the styling, etc. However, I need certain parts of the string to actually 'link' to specific actions in the app. For example, consider the text 'this links should open up a native view for [photo 1] and [video 2]'...
ming yeow
1

votes
1

answer
0

Views

How to convert an Integer Handle to HWND

I am writing a small test program, and for that i require the handle of an edit control. I have copied the value of the handle from Spy ++ (lets say 000A0B40). So i did the following #define editControlHandle 0x000A0B40 int *intHandle; intHandle=(int*)editControlHandle; HWND handle=(HWND)intHandle;...
Ashish Kumar Shah
1

votes
1

answer
672

Views

Can two panels share a uicontrol in a MATLAB GUI?

I've got a MATLAB GUI that has different aspects of functionality, each with their own panel of uicontrols. When one panel is selected, the other one is set to invisible, and vice-versa. However, they share some of the same inputs in the form of a popup menu. Can I include a 'clone' instance of the...
Doresoom
1

votes
1

answer
1.3k

Views

MATLAB set background color in a cell of uicontrol

I want to set a background color in a cell.. something like: so I have the RGB color and the number of cell I want to color. you can assume that the position of the cell is what I wrote. my color is given by RGB: color = [255 0 0]; I want to add it in the 10th cell, so I wrote something like: S.cell...
Alon Shmiel

View additional questions