ListBox in Windows 8 WinRT app - listbox

Hi Is there a way to force show vertical scrollbar of ListBox?
I want it to be visible all the time. I got it to show up when the mouse is over and stay but
I need it to be always shown.
Thank you.

Related

Scrolling like Google Chrome with a click of the mouse wheel button

In Google Chrome when you click the mouse wheel button you get this cursor:
And then you are able to scroll to all possible directions, when you move around with your mouse...
IE also has this, but only moves up and down:
Is there any component for Delphi that can do this? (for a TScrollBox for example)
TMemo, for example, can do that for you, provided you set its ScrollBars property to something else than ssNone. It will even adjust according to which scroll bars are enabled. Problem with TScrollBar component is that on its own it doesn't have any focusable parts and won't receive OnMouseWheel(/Up/Down) events, but its included windowed controls might. You could write a workaround for that on main form events, though. Check solutions at http://www.delphipages.com/forum/showthread.php?t=197309
EDIT: OnMouseWheel(/Up/Down) should be OnMouse(/Up/Down), thanks to #Sertac Akyuz for pointing this out ;)
Seems like this feature is available in RAD studio 2009 (but not in D7).
You need to use Imouse (imouse.pas unit) and the control must have ControlStyle of csPannable.
quote:
Imouse (imouse.pas unit) is a standard implementation of scrolling
with middle button (called also "mouse panning"). It's also used in
RAD Studio. Imouse functionality relays on standard window scrollbars
and sends WM_HSCROLL/WM_VSCROLL to the window to make it scroll. It
works on every window, that have a scrollbar (e.g. TListView,
TTreeView, even TForm/TFrame if AutoScroll is True and at least one
scrollbar is visible).
Oh, I've forgotten one thing. Control must have csPannable in
ControlStyle, but RichView hasn't by default. So, after adding Code:
RichViewEdit1.ControlStyle := RichViewEdit1.ControlStyle +
[csPannable];
I didn't test it though.
All that is left for me is to look into the source code (When I can get my hands on copy of D2009) and maybe impliment this with D7...

Delphi: Right aligned panel flickers upon resizing form

it should be simple but I don't find how to do it.
I create a form with a right aligned panel that I color in blue for example.
If I grab my forms left edge and resize it back and forth horizontally quickly, I would like the right panel not to move or flicker. As its position is unchanged, there is no reason why it should not stay completely steady. Does anybody know a simple trick to solve this apparently simple problem?
Thanks
This is just a fact of life with Windows GUI apps. You can see the same effect in a WinForms app and indeed even in mainstream Windows apps. For example, open an Explorer window and do exactly the same operation, resize by grabbing the left hand edge of the window. You will see exactly the same effect. You can see the same effect by resizing from any edge. Word and Excel behave in the same way.
My guess is that Windows repaints in the sizing loop before it sends the resizing message that allows the app to realign its controls.

How to display tooltip or hint similar to Delphi XE tooltip code insight

I'm looking at wanting to implement a tooltip similar to the way Delphi XE does when you're debugging and you hover over an object. ie, it opens up a hint window with + signs which you can expand etc.
I'm trying to create a hint window which will show a list of items (for example) when hovering over a control (such as a button) which will let the user click on an item and I can then do something based on the item they've selected.
Are there any components out there that might do that already? Or am I better of just creating a borderless form and handle the showing/hiding myself with mouse events?
Thanks
Jason
I know there are hint components with embedded html. So you can have a kind of html treeview inside you hint!
I think it is a solution for you.
HTMLHint from TMS Software
THintBox from Cramon Utilities (freeware!)

How to navigate BlackBerry BrowserField2 in OS5

I am using the new BrowserField2 in BlackBerry OS5 to display HTML content in my app. There are 3 options available for navigation through links in that content.
CURSOR navigation uses a block cursor and actually moves through the characters of the page. Not very useful for me.
POINTER navigation uses a mouse like pointer that you move around the screen and hover over elements. This could work but there is a bug however in that the browser field captures navigation and never lets go so this mode is effectively broken if you share a screen with any other managers. Once your focus enters the browser field you cannot move focus back out and into neighboring fields. RIM has acknowledged the bug but has no work around.
NONE which is for custom navigation but they offer no explanation as to how you would do this.
What I ideally want is to simply have trackpad movements move the focus through the links and highlight them. Then a click would activate the link. I assume I would select the NONE option above and implement my own focus navigation but I am not clear how this can be accomplished with the new APIs.
Is anyone familiar with the new browser2 component could give some guidance?
Thanks!
There's a workaroudn to getting back the focus out of the BrowserField using the NAVIGATION_POINTER.
I found it in this thread:
http://supportforums.blackberry.com/t5/Java-Development/BrowserField-2-Navigation-Mode/td-p/632172
"farahh" posted this:
I found out a hack..
with the navigation set to pointer mode, a click outside the browserfield manager invokes Manager.invokeAction(int). I used the getFieldWithFocus to verify which field has focus and then switch the focus to something else.
Cheers.
Nahuel
PD: i havent found out how to get the behaviour you want, i need that as well so if you got it working please let me know, its kinda urgent in my project =(
I actually reverted back to the older browser1 (OS4) component because the navigation problems in browserField2 (OS5) were a deal breaker for me. Luckily the OS4 browser does everything I need in terms of functionality and it has the exact navigation behavior I need and there are no focus problems mixing it with other views.

Team Explorer work item UI is too wide

Is there any way to get the work item query results preview pane to auto-size its width? It is very often "too wide", with the controls being way too wide for their content. Here's an example--why do I have to have horizontal scrolling? Is there any way to fix this?
(When one opens a single work item, the width is streched appropriately. This is the behavior I want for the above query results preview.)
My favorite is opening work items when checking code in. If you open the work item from the check in window, close it, and open it again, then the spacing starts doubling. Every time you reopen it the spacing just gets bigger.
It's a bug. Hopefully 2010 fixes this.

Resources