Saving resize width of RadSplitter with RadPanes - session

I have a RadSplitter with two RadPanes. When I resize the control, I'd like my program to remember the position of the split so that when the user returns to the page, it will keep the position. The only way I can think of doing it is by storing the width in a session variable that can be retrieved when the page loads. My issue is that I can't run server-side code when the splitter is resized or when the page is closed (or the user moves to another page on the site)
Any suggestions?
Thanks in advance

Have you tried using the OnClientResized event of the RadSplitter to store a cookie on the user's machine via JavaScript? You can retrieve it in the OnClientLoaded event and resize the Splitter according to the values from the cookie.
On working with cookies I can recommend that you start by examining
PPK's quirksmode.org article and
w3schools' tutorial on the matter.

Related

Nativescript - Add to favorites/featured

I´m in that point on my app where i need to give the user the ability to save to favorites. To be more specific, let´s say that he´s seeing a list-view and then presses one of the listitems which takes him to the detail of that item...here i have a star icon that when pressed it should save that item and then if he navigates to the favorites page, he will see another listview with all of the favorites.
but i´m stuck on how to accomplish this, the only thing that comes to my mind is the application settings...it should be a dynamic array that always exists and then keeps adding or deleting objects(favorites).
Any thougts on this? can anyone suggest me an approach? maybe a better one?
Regards
You may use the nativescript-localstorage plugin which internally uses file system only and takes care of reading / updating JSON file as needed.

Auto resize a dialog control when parent window is resized WinApi

I am trying to show a web page in a dialog control. All is working fine till I maximize the parent window, the inner control with webpage retains its size and so a blank area is left at the side of window. I want to know is there any WS_* message or something I can use to auto resize control when we resize the main window. I am using resource hacker so may be there can be some trick I should know.
Any help is appreciated.
Thanks.
The application must perform the resize. And it does so when it receives a WM_SIZE message for the parent control.
You are not going to be able change this by modifying the resources in a pre-existing binary. You are going to need to write some code to respond to that message.
The way I'd try seeing as I've never tried to hack something like this in.
Would be to see if the web control had an anchors property.
Its should be being passed a wm-size message, it's just not doing anything with it.
If you anchor all four corners of the webcontrol it should resize relative to it's parent.
The other way this is done is through explicit code that handles a resize event, don't think you could hack that in very easily though.

Page State in Windows Phone 7 applications - do I need to save it?

In the following blog post the author describes the need to store page state, e.g. the text within a TextBox control, in the Page State dictionary so that it is restored when navigating between pages:
http://www.wintellect.com/CS/blogs/jgarland/archive/2011/01/26/a-matter-of-state-part-1.aspx
However, I have created a very simple application that has one page with a Button and a TextBlock and a ListBox of items. The button navigates to a dummy page, via NavigationService.Navigate. Now, if I scroll the list and input some text into my TextBox, navigate to the dummy page, then hit the back-button, I can see that my text is still present in the TextBox and the scroll position was preserved.
My question is, (tombstoning aside) do I ever need to persist the state of UI controls when simply navigating between them? It would appear that the frameowkr does this for me (despite the blog post above!).
You should persist state if it makes sense in the context of your application and will be helpful to the user.
This almost certainly means when tombstoning but probably not when the application is closed via the back button and then restarted.
In your scenario, the scroll position and text will be lost on tombstoning so you probably want to save these details.
Saving state is only relevant in the context of tombstoning and launching new instances of an application so (a tiny number of exceptional cases aside—and it doesn't sound like you are one of them) it doesn't make sense to talk about saving state outside of this.

A portion of my webpage changes dynamically — how on Earth do I let screen readers know?

Is it possible to dynamically update a portion of a webpage (for example: to display a list of errors from a form submission) and indicate to screen readers that they should skip to the updated portion?
Are full (non-Ajax) postbacks the only way to have accessible error messages?
Edit (please see comments)
To be clear, by "screen readers", I am referring to software that either speaks the text on the screen or converts that text to Braille.
Maybe this might help
Making Ajax Work with Screen Readers
Also See
Implementing Screen Reader in Ajax

replicating mouse motion using ajax

I want to implement an application on my website where once the users are connected, they share a text editor. If one user enters anything on
the text editor available on his screen, the same text appears on the second user’s
screen at the same coordinates.
Same thing goes for the other user. Also there would be pointer shaped images on both user’s screens to represent mouse pointers.
When user A moves his mouse pointer, the image on user B’s screen should be
moved according to the movement of user A’s mouse and similarly, when user B
moves his mouse, the image on user A’s screen should be moved accordingly.
The problem is I am using database to store the coordinates of each user. And this approach results in the a lot of lag and delay. What should I use in place of the database?? Please Help !
You probably don't want to request the updates but push them to your clients: http://en.wikipedia.org/wiki/Comet_%28programming%29 . This reduces the delay between an update from your client to the server and other clients again checking for updates.
how abt using Redis : http://code.google.com/p/redis/
an example of a similar collaborative text editor using this : http://www.web2media.net/laktek/2010/05/25/real-time-collaborative-editing-with-websockets-node-js-redis/

Resources