Search Results

Search found 14593 results on 584 pages for 'pat inside'.

Page 27/584 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • UIView inside UIView with Shadow?

    - by Rnegi
    Hi, I've been trying to figure out how to draw a shadow for an UIView that was added inside a UIView with addSubview. I searched online and read the docs, but the Apple docs simply draw new shapes as shown below. I want to use the Core Graphics to add a shadow to the UIView, but am unsure how to do this to a UIView directly. CGContextRef myContext = UIGraphicsGetCurrentContext(); //CGContextRef myContext = myCGREF; CGSize myShadowOffset = CGSizeMake (10, 10);// 2 CGContextSetShadow (myContext, myShadowOffset, 0); // 3 CGContextBeginTransparencyLayer (myContext, NULL);// 4 // Your drawing code here// 5 CGContextSetRGBFillColor (myContext, 0, 1, 0, 1); CGContextFillRect (myContext, CGRectMake (a_view.frame.origin.x, a_view.frame.origin.y , wd, ht)); CGContextEndTransparencyLayer (myContext);// 6 I know I should put this in the SuperView drawRect method, but I don't know how to make it so it adds a shadow to the views I add in addSubView. Thanks!

    Read the article

  • iPhone SDK: subFolders inside the main bundle

    - by codemercenary
    Hi, in the current project I have a number of folders, with subfolders, and these contain images: 01.png, 02.png. Folder1/FolderA/f1.png Folder1/FolderB/F1.png When I compile the app, I looked inside the the .app and noticed that all the images are placed in the top level, with no sub-folders. So clearly when trying to load the image this doesn't work: NSString *filePath = [[NSBundle mainBundle] pathForResource:@"f1" ofType:@"png" inDirectory:@"Folder1/FolderA"]; But even more strangely, when loading image "f1", the image actually loads "F1" UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"f1.png"]]; Anyone have ideas on how to get around this problem? Is there a compile option to create the folders in the app bundle? TIA.

    Read the article

  • iPhone SDK: subFolders inside the main bundle

    - by codemercenary
    Hi, in the current project I have a number of folders, with subfolders, and these contain images: 01.png, 02.png. Folder1/FolderA/f1.png Folder1/FolderB/F1.png When I compile the app, I looked inside the the .app and noticed that all the images are placed in the top level, with no sub-folders. So clearly when trying to load the image this doesn't work: NSString *filePath = [[NSBundle mainBundle] pathForResource:@"f1" ofType:@"png" inDirectory:@"Folder1/FolderA"]; But even more strangely, when loading image "f1", the image actually loads "F1" UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"f1.png"]]; Anyone have ideas on how to get around this problem? Is there a compile option to create the folders in the app bundle? TIA.

    Read the article

  • Binding the position and size of a UserControl inside a Canvas in WPF

    - by John
    Hi. We have dynamically created (i.e. during runtime, via code-behind) UserControls inside a Canvas. We want to bind the position (Canvas.Left and Canvas.Top) and width of those sizable and draggable UserControls to a ObservableCollection<. How would we achieve this if the Usercontrol is contained in a DataTemplate which in turn is used by a ListBox whose DataContext is set to the collection we want to bind to? In other words, how do we bind a control's position and size that doesn't exist in XAML, but in code only (because it's created by clicking and dragging the mouse)? Notice that the collection can be empty or not empty, meaning that the size and position stores in a collection item must be correctly bound to so that the UserControl can be sized and positioned correctly in the Canvas - via DataBinding. Is this possible?

    Read the article

  • ListView items not clickable with HorizontalScrollView inside

    - by Felix
    I have quite a complicated ListView. Each item looks something like this: > LinearLayout (vertical) > LinearLayout (horizontal) > include (horizontal LinearLayout with two TextViews) > include (ditto) > include (ditto) > TextView > HorizontalScrollView (this guy is my problem) > LinearLayout (horizontal) In my activity, when an item is created (getView() is called) I add dynamic TextViews to the LinearLayout inside the HorizontalScrollView (besides filling the other, simpler stuff out). Amazingly, performance is pretty good. My problem is that when I added the HorizontalScrollView, my list items became unclickable. They don't get the orange background when clicked and they don't fire the OnItemClickedListener I have set up (to do a simple Log.d call). How can I make my list items clickable again?

    Read the article

  • Positioning an image inside an ImageView width max height and max width set

    - by andern
    I have an ImageView with max height and max width both set to 100. The figure below is clearly not a square, but you can use your imagination ;) Figure 1: +----------------------------------------------+ ¦ ImageView +--------------+ ¦ ¦ ¦ ¦ ¦ ¦ ¦ Actual image ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ +--------------+ ¦ +----------------------------------------------+ Anyway, If I try to set a BitMap to the ImageView that does not have a ratio of 1:1, the image is positioned like pictured in Figure 1. What I want is for the picture to be placed to the left inside the ImageView like pictured in Figure 2 below. Figure 2: +----------------------------------------------+ ¦--------------+ ¦ ¦ ¦ ¦ ¦ Actual image ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--------------+ ¦ +----------------------------------------------+ You can see my ImageView in XML below. maxHeight, maxWidth and adjustViewBounds are set during runtime. <ImageView android:id="@+id/someImage" android:layout_alignParentLeft="true" android:layout_below="@+id/textName" android:layout_height="wrap_content" android:layout_width="wrap_content" android:paddingRight="4dp" /> This is in a RelativeLayout if it makes any difference.

    Read the article

  • WPF ComboBox text inside ListBox

    - by geosteve
    I've got a list of ComboBoxes inside a listbox, like so: <ListBox ItemsSource="{Binding Values}"> <ListBox.ItemTemplate> <DataTemplate> <ComboBox ItemsSource="{...}" IsTextSearchEnabled="True" IsEditable="True"/> </DataTemplate> </ListBox.ItemTemplate> </ListBox> The Values for my listbox ItemsSouce is defined in my ViewModel as public ObservableCollection<string> Values { get; set; } How can I get the Text for each one of the ComboBoxes to show the Value for that particular ListBox item? (i.e. if values is {"a", "b", "c"} I want a list of 3 comboboxes showing "a", "b" and "c")

    Read the article

  • Bash/shell script - shell output redirection inside a function

    - by Josh
    function grabSourceFile { cd /tmp/lmpsource wget $1 > $LOG baseName=$(basename $1) tar -xvf $baseName > $LOG cd $baseName } When I call this function The captured output is not going to the log file. The output redirection works fine until I call the function. The $LOG variable is set at the top of the file. I tried echoing statements and they would not print. I am guessing the function captures the output itself? If so how do push the output to the file instead of the console. (The wget above prints to console, while an echo inside the function does nothing.)

    Read the article

  • Android TextView inside a ListView setTextHighlightColor() issue

    - by y ramesh rao
    I have Listview and Textview inside it now the thing is that i want to change the Text Color over the Selection of the that cell in the Listview but setting setTextHighlightColor of Textview is not giving this output I have tired setting a selector for this but that is not Heling too. Can this be solved. What might be causing the issue to populate. The Cell.xml is <ImageView android:id="@+id/thumbnail" android:layout_width="48dip" android:layout_height="48dip" android:layout_gravity="center_vertical" android:src="@drawable/icon" /> <TextView android:id="@+id/username" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_toRightOf="@id/thumbnail" android:layout_alignParentTop="true" android:gravity="top" android:text="Username" android:textColor="@drawable/timeline_username_selector" /> <TextView android:id="@+id/time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_marginLeft="10px" android:text="31stMarch,2010" android:textColor="@drawable/timeline_username_selector" /> <TextView android:id="@+id/textTweet" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@+id/username" android:layout_toRightOf="@id/thumbnail" android:layout_alignParentBottom="true" android:gravity="top" android:textColor="@drawable/timeline_tweet_selector" /> And the selector for the text color is something like this

    Read the article

  • ScoreNinja causes java.lang.RuntimeException: Can't create handler inside thread that has not called

    - by sirconnorstack
    I'm trying to add ScoreNinja, the global high score system, to my Android game, and it works fine when I load it on my phone, but when I release it into the wild, I got crash reports saying: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() Here is part of the call stack: android.os.Handler.<init>(Handler.java:121) android.app.Dialog.<init>(Dialog.java:99) android.app.AlertDialog.<init>(AlertDialog.java:65) android.app.AlertDialog.<init>(AlertDialog.java:61) android.app.AlertDialog$Builder.create(AlertDialog.java:797) android.app.AlertDialog$Builder.show(AlertDialog.java:812) com.scoreninja.adapter.ScoreNinjaAdapter.show(ScoreNinjaAdapter.java:136) com.scoreninja.adapter.ScoreNinjaAdapter.show(ScoreNinjaAdapter.java:99) I thought the main thread had prepare() called automatically, and if not, why would it work fine for me but not anyone else?

    Read the article

  • C# Modify Connection String that exists inside a library

    - by LnDCobra
    I have a Class Library, which inside just has a DataSet (MySQL connector) and a Connector class. I use this class in multiple projects to connect to the database, and I always had the password embedded in the connection string but now I need to be able to modify this string(for security purposes) so I can have the user connect using their own account. How can I modify this connection string. I have tried the following Properties.Settings.Default.DataBaseConnectionString = "String"; But it seems that the connection string is readonly becase it doesn't appear to have a setter value. I also tried the following with no luck Properties.Settings.Default.DatabaseConnectionString.Insert( Properties.Settings.Default.DatabaseConnectionConnectionString.Length - 1, "Password=dbpassword;");

    Read the article

  • breaking out of for loop when running a function inside a for loop

    - by andrewj
    I'm embarrassed that I'm asking this question, but here I go: Suppose you have the following function foo. When I'm running a for loop, I'd like it to skip the remainder of foo when foo initially returns the value of 0. However, break doesn't work when it's inside a function. As it's currently written, I get an error message, no loop to break from, jumping to top level. Any suggestions? foo <- function(x) { y <- x-2 if (y==0) {break} # how do I tell the for loop to skip this z <- y + 100 z } for (i in 1:3) { print(foo(i)) }

    Read the article

  • Redirect parent page inside jQuery-ui-dialog

    - by imperialx
    Hello, I have this iframe that resides under a jquery-ui-dialog and inside this iframe is a link that redirects to another page when clicked through jQuery, however, the iframe gets redirected alright but not the entire parent page. parentpage.aspx <script type="text/javascript"> $(document).ready(function () { $("#form-dialog").dialog({ autoOpen: true, modal: true, width: 200, draggable: true, resizable: true }); }); </script> <div id="form-dialog" title="Image Upload"> <iframe src="/imageupload.aspx"> </iframe> </div> imageupload.aspx <script type="text/javascript"> $(document).ready(function () { $("#btnDone").click(function () { window.location = "http://localhost/uploadcomplete.aspx" }); }); </script> <a href="#" id="btnDone">Redirect</a> thank you for your help. -imperialx

    Read the article

  • Matlab multiple graph types inside one graph

    - by mirekys
    Hi, I have a task to draw electrostatic field between two electrodes( at given sizes and shape ), what i have now is that i draw the electrodes with area plot (area(elect_x,elect_y)) the graph looks like this: ------------------.--- |.. .---. |.. |...| |.. .----....| |.. |........| |.. ---------------------- and now i would need to draw inside this probably a mesh, showing the field. Is there any way to do it, or i´m on a wrong way? Thank you very much for every guide

    Read the article

  • Insert custom TypeConverter on a property at runtime, from inside a custom UITypeEditor

    - by Pedery
    I've created a custom UITypeEditor. Can I possibly insert an attribute that also attaches a TypeConverter to my property from inside the UITypeEditor class? I've tried the following, but nothing happens, no matter how I twist and turn it: Attribute[] newAttributes = new Attribute[1]; newAttributes[0] = new TypeConverterAttribute(typeof(BooleanConverter)); Now, the above needs to have the following attached to it somehow: TypeDescriptor.AddAttributes(context.Instance.PROPERTYNAME, newAttributes); ...but first of all I don't know how to get to the property in question in a generic way, and all code I try just fails. Even if I try to assign the TypeConverter in this manner globally, it fails. (Setting it as an attribute on the property itself works though, just to rule out that the bug is in that part.)

    Read the article

  • Lists inside lists don't validate with w3c?

    - by cosmicbdog
    Hi everybody, I've got some lists inside lists to make some fancy drop-down menus. e.g <ul> <li>something <ul> <li>sub menu</li> </ul> </li> </ul> Problem is, w3c doesn't like it. Is there a way to make this validate or this just one of these hacks that browsers can render, but w3c dislikes?

    Read the article

  • breaking out of for loop when running a function inside a for loop in R

    - by andrewj
    I'm embarrassed that I'm asking this question, but here I go: Suppose you have the following function foo. When I'm running a for loop, I'd like it to skip the remainder of foo when foo initially returns the value of 0. However, break doesn't work when it's inside a function. As it's currently written, I get an error message, no loop to break from, jumping to top level. Any suggestions? foo <- function(x) { y <- x-2 if (y==0) {break} # how do I tell the for loop to skip this z <- y + 100 z } for (i in 1:3) { print(foo(i)) }

    Read the article

  • call a class method from inside an instance method from a module mixin (rails)

    - by sean
    Curious how one would go about calling a class method from inside an instance method of a module which is included by an active record class. For example I want both user and client models to share the nuts and bolts of password encryption. # app/models class User < ActiveRecord::Base include Encrypt end class Client < ActiveRecord::Base include Encrypt end # app/models/shared/encrypt.rb module Encrypt def authenticate # I want to call the ClassMethods#encrypt_password method when @user.authenticate is run self.password_crypted == self.encrypt_password(self.password) end def self.included(base) base.extend ClassMethods end module ClassMethods def encrypt_password(password) Digest::SHA1.hexdigest(password) end end end However, this fails. Says that the class method cannot be found when the instance method calls it. I can call User.encrypt_password('password') but User.new.encrypt_password fails Any thoughts?

    Read the article

  • How to use @FileUpload.GetHtml inside Html.BeginForm and sumbit FilesList

    - by Diode
    There is a default submit button for the @FileUpload.GetHtml. But I am expecting to have a submit button inside the Html begin form and use that substitution to submit the list of files with some more parameters. But when I do that the passing IEnumerable is always null in the Action method. This is my Action method: [HttpPost] public ActionResult Change(IEnumerable filesList, Guid ID, string Btn) {.... @using (Html.BeginForm("Change", "Home",FormMethod.Post)) { <textarea id="textArea" name="epost2" class="frm_txtfield_big" style="float:left; width:638px; height:200px;"></textarea> <input type="hidden" name="supportID" value="@Model.ID" /> @FileUpload.GetHtml(name: "ChooseFile",initialNumberOfFiles: 1,allowMoreFilesToBeAdded: true,includeFormTag: false) .......} But this is not passing the list of files to the method. Am doing it wrong or what is the wrong with the code.

    Read the article

  • UIToolbar above UIWebView inside UIScrollView

    - by Nick VanderPyle
    I'd like to display a toolbar above a UIWebView but hide the toolbar until the person "pulls it down". The same functionality can be seen in Safari on the iPhone. When the page loads, the toolbar containing the address is hidden. You must pull it down. In Safari it's possible to scroll up and eventually see the toolbar or scroll down through the page contents. I've tried placing a UIToolbar and UIWebView inside a UIScrollView but it didn't work. I've tried setting the UIScrollView to the size of the toolbar and webview combined, but that didn't work. - (void)viewDidLoad{ CGSize size = CGSizeMake(webView.frame.size.width, toolBar.frame.size.height + webView.frame.size.height); [scrollView setContentSize:size]; } How should I go about doing this?

    Read the article

  • TreeView inside AutoCompleteBox's popup

    - by Satumba
    Hi, Inspired by this post, I'm trying to use a TreeView inside the AutoCompleteBox's popup in order to show hierarchical data. Here's what i did: I Made my own TreeView that implements ISelectionAdapter (not sure it's perfect) Edit AutoCompleteBox template and change the selector to my treeview Try Bind my ViewModel to it Unfortunately this is not working. i checked my new TreeView with the same binding to the same object and it works prefectly when it's outside of a AutoCompleteBox template. Any idea? any special way to implement ISelectionAdapter for treeview? did i missed something? couldn't find any example for it on the web... Thanks.

    Read the article

  • C#: Insert custom TypeConverter on a property at runtime, from inside a custom UITypeEditor

    - by Pedery
    I've created a custom UITypeEditor. Can I possibly insert an attribute that also attaches a TypeConverter to my property from inside the UITypeEditor class? I've tried the following, but nothing happens, no matter how I twist and turn it: Attribute[] newAttributes = new Attribute[1]; newAttributes[0] = new TypeConverterAttribute(typeof(BooleanConverter)); Now, the above needs to have the following attached to it somehow: TypeDescriptor.AddAttributes(context.Instance.PROPERTYNAME, newAttributes); ...but first of all I don't know how to get to the property in question in a generic way, and all code I try just fails. Even if I try to assign the TypeConverter in this manner globally, it fails. (Setting it as an attribute on the property itself works though, just to rule out that the bug is in that part.)

    Read the article

  • Masked Edit extender inside a Repeater

    - by Viswa
    How can i dynamically create a textBox and a Masked Edit extender inside a Panel. My code is something like this: In the ASPX page: In the Aspx.cs page Private DataView Function1() { Dataview dv =new dataview(); return dv; } Private void ShowProducts_OntemDataBound(object sender, RepeaterEventItem e) { //Consider For the First Iteration of the Repeater I am Creating a Simple Text Box Dynamically Textbox txt = new textbox(); txt.Text = "8888888888"; txt.Id = "TextBox1"; //Consider For the Second Iteration of the Repeater I am Creating another TextBox and a Textbox txt1 = new textBox(); txt1.text="2223334444"; txt1.Id = "TextBox2"; MaskedEditExtender mskEdit = (MaskedEditExtender)e.Item.FindControl("MskEdit"); mskEdit.TargetControlId = txt1.Id; Panel panel1 = (Panel)e.item.Findcontrol("Panel1"); panel1.Controls.Add(txt1); } When running the above code it is giving me "Null Reference Exception for MaskedEditExtender".Please suggest me some way for this.

    Read the article

  • Replace all "&gt;"(>) which are inside <code> tags

    - by Micke
    How can i replace all &gt; with > and &lt; with < inside a <code> tag with ruby? For example: <code>&lt;script&gt;alert('I steal cookies');&lt;/script&gt;</code> With: <code><script>alert('I steal cookies);<script><code> The reason for this is because the h() method escapes all the < and > Thanks, Micke

    Read the article

  • Embed a video in my mediamanager inside content in Joomla1.5

    - by Aruna
    Hi, I am working on Joomla currently for the past one month. I am trying to embed a video stream in my article page like inside the content i am trying to have video stream like youtube video. I have uploaded a video in my media manager. And i dono how to stream that video in my page. Please help me in doing so.. EDIT: FOr an youtube video i have used like But i am having the video in my http://www.abc.com/images/abc.flv i am not able to know of how to use this video ?? Please help me..

    Read the article

< Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >