I'm trying to create a vertical Menu and after looking in the default template file I see that the standard is a horizontal one but there is also a region for a vertical menu (MenuVertical). What I can't figure out is how the heck I change the region used from Menu to MenuVertical. I've searched for hours in the documentation and looking through class references, but I can't figure it out.
I'm new to this framework and I guess this is VERY easy to do, but what isn't easy when you know how to do it eh? :)
EDIT: Just to be clear, this is a question about the Agile Toolkit Framework
Yes it's very easy. When you create an object, you specify template and a region as 4th argument:
$this->add('Menu',null,null,array('menu','VerticalMenu'));
If omitted object takes the value from the defaultTemplate method:
function defaultTemplate(){
return array('menu','VerticalMenu');
}
Related
I am trying to create a markdown editor for fun and because I was interested in learning TextKit. I am working on iOS devices only, so I only have UIKit framework at my disposal, also I watched this WWDC18 video which explains some best practices to adopt with TextKit. At first I was really interested in knowing how to get the same result that the video shows at 22:13.
The code shown by the dev in the video makes use of AppKit and it wraps code in that rectangle by replacing the code section with a NSMutableParagraphStyle and by providing a custom NSTextBlock to the latter. As you can guess, I can't subclass NSTextBlock in UIKit and therefore I can't replicate the example shown.
I have something a little bit harder to ask though, what I really wanted to replicate is the GitHub application code block style, this is the final result that I would like to replicate:
As you can see it should have a rounded rectangle with a custom background color and also it needs to be scrollable in order to make code expand as much as it needs (I am not interested in syntax highlighting).
How can I achieve something like this if NSTextBlock is not available in UIKit?
For the moment all I have done is override NSTextStorage to set the correct font to the code section with custom NSAttributedString.
I have investigated in the app and noticed that it is managed by Ryan Nystrom which is the creator of GitHawk prior to moving to GitHub. The GitHawk markdown reader is very similar to the one that you find in the GitHub application and the funny thing is that GitHawk is open source so I took a look at that code and tried to understand how that could be replicated.
Turns out that GitHawk heavily uses IGListKit framework and parses markdown in ListDiffable elements, specifically the code blocks ListDiffables are given to a ListSectionController that created an horizontal UIScrollView to display code.
I gave up trying to understand more on this because GitHawk code is really really entangled and it is really hard, near impossible, to extract the specific functionality.
I was wondering if a feature for WxPython existed or if I need to make it.
Here is a sample from a C# program I am trying to achieve with a property grid:
Sample Grid Image
I want this look with a checkbox in front of a PropertyCategory such as Group 0 or Message 0 in PropertyCategoryExample and can include the category. If you include the parent category I want the children categories to also be included.
Basically it acts as the expansion next to it but is a checkbox. I want to be able to still expand and shrink but just an extra checkbox when I go to save to see if the user wanted it included.
I have looked around in the docs and web but can’t find anything related to this. Do I need to make a custom property to do this?
I have asked on the discussion board but I haven't heard anything back
Thanks for your help in advance!!!
I am relative new to flutter. I was wondering the proper approach in order to implement an AppBar search by using the Search Delegate in Flutter. I read various articles on how to do that. However, with dummy data (used in examples) and just no real world scenarios (code structure) there is no hustle.
My use case consists of
AppBar (home widget - where the search button exists)
One tab (other widget - having a service call to DB at init)
Another tab (other widget -having a service call to DB at init)
My issue is that I want the search to take place at the results lets say of the first tab. So somehow, I have to pass the values return from the service up to my Home widget and then to search Delegate .
I do not know which is the proper way to do that.
InheritedModel/ InheritedWidget ?
passing via the constructors from one widget to another (then I will have tight widget connections and I do not want that)
Some other way using services ?
if any other solution ?
I want the solution to be scalable (as much as possible), in order to make adjustments at near future or add new functionality.
Thanks in advance for your time.
Update
I tried the InheritedModel/ InheritedWidget. For some reason, when I tried to access the data from the build method in Delegate I was receiving null object for inherited object. Probably, I was doing something wrong...I will keep trying...
Adding an image in order to clarify the problem with my app structure...
Do you already know this tutorial?
https://www.youtube.com/watch?v=Wm3OiFBZ2xI
I think, it is exactly what you need. My App uses Data from the Cloud Firestore and the search function is implemented like the search function in this tutorial. It works very well.
Do anyone know on how to create 3d carousel effect in LWUIT?. Can anyone explain me with a sample program on how to implement?.
First of all, I'm considering you want to use Lists, that's the most sensible way to do it, isn't is?
The first thing you want to know is this List.setFixedSelection(List.FIXED_CENTER), and that's the easy part. Tha method makes the list scroll around the middle displayed element, it's to say, it will add the carousel effect.
The difficult part comes when adding the 3D. First ad all, you should have a look to this article, if you haven't done it yet. It's compulsory to understand how LWUIT Lists work and what you can do (and how) with them. Basically you would need to implement a ListCellRenderer and specially the getListCellRendererComponent(List list, Object value, int index, boolean isSelected), there you would have to add the corresponding logic to detect where the list element is going to be painted, and play with the Styles to set shadows, gradients, or whatever you want.
And I'm sorry but I don't have any sample for you, maybe you can have a look at Shai's Blog, I don't know whether there is that specific sample, but there are a lot of them.
Good luck and regards.
One of the coolest features I've seen in help viewers is the ability to hide inherited members so you can focus on only what that particular subclass offers. A good example of this is here...
http://james.newtonking.com/projects/json/help/html/T_Newtonsoft_Json_JsonConvert.htm
Actually, that page has various options for how to show the help, not just hiding inherited members.
Now online MSDN has a habit of just throwing everything under the sun at you meaning trying to figure out what a subclass has added, let alone getting to it requires tons of scanning and even more scrolling.
That said, is there any way, local or online, to enable those or similar features? Has anyone made an external or third-party help viewer that does this or something similar?
(Note: I'm not really sure if this is for SO since it's not a programming thing, but it is sort of an IDE-related thing so I figured I'd gamble and put it here.)
Mark
Hiding inherited items is one thing I used to miss in the Lightweight style online MSDN docs.
Fortunately, it can be easily solved by using a litte bit of in browser javascript. See How to hide inherited members on MSDN pages for details.
You should be able to expand the used principle to hide any information you need (eg. you could use the icons to tell apart the static members, methods, properties and so on...).
Updated answer for 2016:
Create a bookmark in a modern browser with the following javascript snippet as the URL:
javascript:var trs=document.getElementsByTagName('tr');var l=trs.length;for (var i=0; i<l; i++) { var tr=trs[i]; if (tr.innerHTML.indexOf('(Inherited from ')>-1) tr.style.display=tr.style.display=='none'?'':'none'; }; void(0);
Clicking this bookmark while on an MSDN class documentation page will toggle all the inherited members on and off.
The javascript is just looking through all of the table rows ('tr') on the page, finding any which contain the string '(Inherited from ', and setting their display style (visibility) to 'none'. That search string seems to cover every instance of a member being inherited.