Can I hide the ToolTipText for a Slider Bar? - ms-access

In VBA programming, is it possible to hide the ToolTipText for a Slider Bar?
The picture below shows a Slider Bar on a form in a Microsoft Access database. I would like to hide the ToolTipText in the red circle.
The reason I want to do this is because the Slider Bar cannot show decimal values (example: 0,1), so I want to display the values in a box next to the slider after they are scaled to decimal values. I know how to do this, but not how to hide the ToolTipText for the Slider that shows only integer values.

There is no easy way to remove that indicator as it's not exposed through the control itself.
However, there are a couple of solutions:
Subclassing the control and intercepting Windows messages
Not for the faint of heart, complex and overkill, but you theoretically could intercept windows messages and drop those that correspond to the tooltip.
This is not easy in VBA at all, and I wouldn't even try it.
If you feel like delving into this, have a look at an example in KB278379
Just display something else.
More interesting is the ability to change the displayed text to something else:
To change the text, handle the Scroll event and update the slider's Text property:
Private Sub MySlider_Scroll()
MySlider.Text = "Awesomeness: " & (MySlider.Value * 7.89)
End Sub
The event is not visible from the control's properties themselves, but if you open the IDE and select the Slider from the list of controls, you will be able to create the code for handling the Scroll event:

Related

How can we extend chart legend in Foundry-Slate

In slate, chart widget have label option that display legend (color dot + label name) at some place of the chart (top, left, bottom, ...).
I notice 2 limitations with this legend on bar chart and I would like to improve them on my Slate apps.
1 issue: label are ordered in the order series appears on the bar chart (from left to right).
2 issue: when segmented and not-segmented data are stacked on the bar chart, label of not-segmented data have wrong color (even if we set series color parameter, and if we don't color attribution is random and change from one loading to the next).
For that reason I decided to produce my on labels in an HTML widget. I get a nice result just with a function that sort label and return a <div class="bp3-label" style="background:${labelColor};">${labelName}<\div> for each label. But I loose the interactivity (this is a convenient function of labels).
Is there a way to transfer this interactivity to my "custom label" and make click on this selecting all relevant bars on my bar chart?
I'm thinking to use slClickEvent and slClickEventValue props on the DIVs to push data relative to the clicked Label in a variable and to make the bar chart "selectedValue" property dependant of this variable.
Is it the best ways ?
Will the bar be highlighted in accorance with chart "selectedValue"?
You're on the correct track here - I often build custom chart legends in an HTML widget to have more control over the appearance and interaction compared to the native legend. If you search on your Foundry instance, you'll even find a folder of Slate apps that are examples of different HTML widget patterns, including one called HTML - Legend that shows some examples with custom CSS and Blueprint styles.
For the interactivity, I'd probably go with using custom HTML selection, rather than custom HTML click events, because with the custom selection, Slate will automatically add a selected class to whatever element you've added the selection to, which will make it easy to update the styling to reflect the selection.
Nothing would stop you from doing this with custom clickEvents instead, but you'd then need to also do some more work to reflect the selection status in the legend or else go without that extra affordance.
If you search your Foundry instance for Line Chart Series Selection with Custom Legend you'll find an example that shows exactly this. In that specific example, the Line "selection" is indicated on the chart by changing the line styling; with a Bar chart, you'd actually want to template (with Handlebars) the selection status of the chart in the </> panel. Then, when the user makes a selection using the legend, the chart will reflect that selection as if they'd chosen by clicking on the bars themselves.

MS-ACCESS Conditional Formatting while scrolling

I have a continuous subform (Data) within a single form (Main) where I use conditional formatting. The problem is, when I click the scroll bar to go down the list, the conditional formatting is removed until I un-click the scroll bar. Scrolling through the list with the mouse wheel works perfectly.
I suspect this is due to a refreshing or repainting of the formatting that is inherently triggered by a click?
I tried using Application.Echo False, and Me.Repaint = False, with no luck (although I am not even sure where I would need to put these).
Does anyone have any experience with this? Note, the data displayed via subform Data is static, meaning the user cannot update the fields within this particular subform (not sure if that simplifies anything).
On a continuous form, conditional formatting is only performed on records that are within view. As new records are scrolled into view, there is a brief delay while the conditional formatting is calculated. As records are scrolled out of view, their conditional formatting is discarded. You should find that scrolling with the mouse wheel does have a bit of a delay in the conditional formatting.
In some situations, one solution is to build the conditional formatting into the recordsource. For example, suppose negative values for Balance should be shown with a yellow background, and you would like to be able to scroll quickly through all the records looking for yellow ones.
I do this by adding another field to the recordsource:
IIf([Balance] < 0, String(30,ChrW(9608)), "") AS BalanceBG
and then binding this to a TextBox with text color of yellow and font of Courier.
The 9608 character is a solid block, and a string of them fit tightly together to make a solid bar.
With this TextBox positioned behind the TextBox for [Balance], the yellow background will show even as the scrollbar thumb is dragged up and down.

Auto resize the width of input text area on hidden DIV

I use a Hide/Show .js script that hides some checkboxes and on the right side there is the search field when I click to hide it I want to expand.
Ex.
Before hidding:
Before hidding Image
After hidding I want the search field to be expanded 100%
After hidding Image
I searched for 2 days something and can't find a way to make it expand I use the bTemplate engine to store the HTML code.
Did you try changing the CSS properties through the "setAttribute" method of the elements in question through Javascript? Basically, the code you used to "hide some of the checkboxes" in the first place is pretty much like how you'd write the code to do the other things you're looking to do.
In other words, When you want the checkboxes out of view and the text entry box centered, as in your second reference pic, you could have the Javascript code written through the "setAttribute" method so that when a particular event happens, the css "display" parameter for the check boxes could be set to "hidden", the size of the text entry box can be increased, and the css "position" parameter for the text entry box can be set to have it centered, etc.
That is, of course if I understand your issue correctly. Can you provide the code you are using? I'm sure me or someone else could clarify things more if we could see what you have written.
Hope that helps at least a little! :)

AS3 Dynamic text box over button

In AS3 I have a button on the stage and above it I create a textbox box dynamically with code.
My problem is that the area that is under the text (i.e. that part of the button) is no longer clickable.
I have set:
tBox.selectable = false;
but that doesn't solve it.
Any ideas
Season greetings,
Luben
Use InteractiveObject.mouseEnabled:
textField.mouseEnabled=false;
If you set component.visible to false it does not interact with the user.
So, if you set tBox.visible = false then it will be invisible and the button will become clickable. Just a thought, but overlapping components is really bad UI design. If you have space on your stage, you should consider keeping them separate
The problem is that text field (despite it's transparent) is lying over button. To make click on button possible you have to be sure that button is in front of text. Take a look at AddChildAt method of DisplayObject. Objects with greater position index are lying over objects with lower position index. So all you need is to make sure that button has greater index:
container.addChildAt(button, 1)
...
container.addChildAt(text, 0)
P.S.: you may embed button dirrectly into text field using html <a href="javascript:..."><img src="link_to_image"><a/> or something like that.

Flex 3 custom components positioning - popups

I have created a custom TitleWindow whcih i use as a popup. The contents of the popup are created dynamically depending on a selection a user makes from a datagrid.
My problem is, my datagrid is in another custom component whcih is toward the bottom of my page so when a user clicks one of the items the popup is displayed however with half of it out of sight at the bottom of the page.
Is there a way to position a popup so that it displays at the top of the page?
I know at least two things you can use to position a popup, though there might be more.
When you place a popup you can choose in which parent component to place the popup:
PopUpManager.createPopUp(this.parent, TitleWindowComponent);
In the component itself:
PopUpManager.centerPopUp(this);
I wanted a help tooltip type popup (with help text) to appear next to the icon that opened it. In the end I used move(x,y) to move the window where I wanted it. To get the coordinates to place it, use globalToLocal:
var globalX:Number = localToGlobal(new Point(myIcon.x, myIcon.y)).x;
var globalY:Number = localToGlobal(new Point(myIcon.x, myIcon.y)).y;
toolTip.move(globalX + myIcon.width, globalY);
That puts the window just to the right of the icon, myIcon.