I've got a bunch of NSTextFields on a window (tagged 1-8) and I'm wondering if it's possible to access each individual text field programatically by its tag number so I can then get/set its value?
I'm a newbie and while I know how to access these fields by name, doing it by tag number will make things an awful lot simpler for what I'm trying to achieve in this particular instance.
Thanks a lot :-)
the_fourth_textview = [the_superview_containing_all_textfields viewWithTag:4];
Related
Much what the title says. When creating a RadDataGrid using TelerikUI in Xamarin.Forms, we get a "header column".
I know the style of can be set via the HeaderStyle property, and the text itself can be hidden by setting HeaderText to an empty string, but how do we actually remove the row of columns itself? Is this possible, with or without custom renderers?
We've tried setting the HeaderStyle to different attributes in hope that it'll fix it (hidden, collapsed etc), we've also tried emptying different properties/tags to try to achieve something similar to CSS's display: none but nothing has given us results as of yet. Any and all help appreciated!
Thanks.
If you want to hide the dots, you can set the Header Style:
<telerikDataGrid:DataGridTextColumn PropertyName="Country">
<telerikDataGrid:DataGridTextColumn.HeaderStyle>
<telerikDataGrid:DataGridColumnHeaderStyle OptionsButtonTextColor="Transparent"
BorderColor="#D9D9D9"
BorderThickness="1"/>
</telerikDataGrid:DataGridTextColumn.HeaderStyle>
</telerikDataGrid:DataGridTextColumn>
In addition, if you don't use any sorting or filtering, you can disable it through these properties
UserGroupMode="Disabled"
UserFilterMode="Disabled"
UserSortMode="None"
So I'm new to OO Programming. Coming from a WebDesign Background and having done mostly design work or some more or less intermediate scripting wherever it was needed in my projects. But being eager to learn and still searching for the "right" way ;-) to do things like you guys do. Not what my Script Kiddie Mind tells me :D. So sorry if that is really a super beginner question, but I would rather grasp the "right" concept from the start.
I'm programmatically populating a NSMenu with NSMenuItems based on contents of a folder located in my Documents Directory. I'm iterating through the subfolders of this fellow, getting the URL of each and every one, extracting the folder name by using
let folder = el.URLByDeletingPathExtension?.lastPathComponent
and creating NSMenuItems based on those names
let menuItem = statusMenu.insertItemWithTitle(folder!, action: #selector(StatusMenuController.doFancyStuff), keyEquivalent: "", atIndex:0)"
So far so good. Now how would I store the associated URL along with the MenuItem for later use like manipulating it when the action gets triggered?
By clicking on the item I want an action to be performed, which needs the full folder URL of course. My first idea was to extend NSMenuItem with a new variable called "path" or so. But since there are no stored values allowed in extensions this is a dead end.
How do you real programmers handle such cases? Using a dictionary and storing the Items along with their respective URLs? Could work, or not? But would that be the correct way? Or getting the full url by taking the MenuItems Title and "reattaching" it to the basefolder URL? Which could also work. Or do you hand the URL to the method/action that will get called as an attribute? I would really love to stay away from messy code :) so your pro insights are very much appreciated.
Thank you for your Time!
andy
NSMenuItem has a property representedObject which can be used for that purpose.
From the documentation:
By setting a represented object for a menu item, you make an
association between the menu item and that object. The represented
object functions as a more specific form of tag that allows you to
associate any object, not just an arbitrary integer, with the items in
a menu.
If you want to store more information than just an URL you could also assign a collection object like Array or Dictionary or even a custom class to representedObject.
I want to create a new text field right under the SKU text field in the Product Information > General tab and populate it with the product's attribute set value. What I want can be seen in the picture below.
Unfortunately, for the past 4 hours I have been trying to locate the file that includes the code which produces the specific layout but so far I had no luck. I 'd be really grateful if anyone could give me a heads up.
Thank you for your time!
Enable backend path hints to find out which file it is. You can do it this way.
http://www.classyllama.com/development/magento-development/enable-templateblock-hints-in-admin-panel
Please note this is basically hacking. A better way to do it would be to follow something like this
http://www.marketingadept.com/blog/2014/01/magento-developers-add-a-custom-field-to-the-category-admin-page/
It's up to you, speed or do it the right way. Goodluck
Having no luck here trying to find a solution to this.
I've set up a looping selector based on this guide. (I also used the ListLoopingDataSource class in Part 2 in order to have strings in my looping list).
What I want to be able to do is then change another element (an image box/placeholder) on my layout, based on what is currently selected in the looping selector.
No real idea how to do this, the onSelectionChanged event is kind of abstracted and not really useful? I'm not sure how to programmatically change images either, it doesn't look like I can access a resource from the code base, only from the xaml.
Any help/suggestions would be greatly appreciated.
I found that I could do this by using binding.
Hi I just want to know that how can i add Subccategories in the Navigation menus without making the parent category to show up there Any Ideas???
thanks in advance
This will take quite a bit of surgery to make this happen in a programatic fashion. You'll need to override the Mage_Catalog_Block_Navigation::_renderCategoryMenuItemHtml() method.
Alternatively, you might be able to hide the parent categories using your skin's CSS? The ul#nav li elements have quite specific class and id values that should allow you to show or hide them. However I suspect given the complexity of the fly-out nav, you may find it more efficient to rewrite the PHP. It probably comes down to where your proficiency lies.
HTH,
JD