datagridview layout behaviour - layout

I have c#/2008/winform application.
I have a form with a picture banner, and a datagridview below it
I want the picture banner to remain fixed in size, and the datagridview to rezise
and fill the rest of the form.
I have set the picturebox to dock=top
(Also pos=0,0, sizemode=centerimage - but these setting are not the problem)
My datagridview misbehaves no matter what i do
If i do dock=fill, it starts from the top of form, and is obstructed by the picture
If i try to set dock=bottom it does not resize with the container
I am aware of the concept of layoutmanagers but this is just a quick app
so i hope i dont need one here.
Any ideas ?
thank you

There may be a better workaround but the first thing I found that worked was to introduce a panel control.
Make you picture box Dock=Top, then place the panel below it with Dock=Fill, then your DataGridView goes inside the panel with Dock = Fill.

Related

Acumatica - Changing textbox Font Color based on value

I've been trying to modify the Projects (PM301000) screen summary area to change the font color of the totals to red when it's in negative value but I can't make it work. I've tried several javascript codes and saw that this is working on a button Dynamically Change Button Color
but I can't make it work on the PXNumericEdit control specifically the totals in the Projects screen.
Projects screenshot
Any idea on how to make it work? Thank you.
You should try changing the CSS via an event handler in the aspx code behind file. See this article

Visual Basic for Applications Animated text

when I open my excel, macro command run automatically and show "welome".But i want to design it little bit.Is there any way i can change its colour size or text box. below my screen shot. [Its not utmost important but I love to know can i animated this text.]
IMAGE LINK
https://msexcel-analysistabs1.netdna-ssl.com/wp/wp-content/uploads/2013/01/run-a-macro-automatically.png
Are you just calling a standard msgbox in VBA? If so, instead of calling a msgbox, you can create an actual UserForm in Excel VBA. From there, place a label in the "box" and you can format the font in a variety of ways: colors, size, text font, etc.
You cannot do any "fun" animations as far as I know. But you can definitely change the font size and color!
Here is an example (I'm not the most creative person)
You do this under the VBA Project Explorer -> Insert -> Userform. From there you add Labels/Buttons/Whatever objects you would like, and resize the form if you so choose. Then in your module/macro, you call this form instead of using a msgbox.
As far as changing the color and size of the text, Yes, you need to create a UserForm and create the 'Welcome' screen as a custom form instead of using VBA's msgbox.
In VBA, right click on the workbook in the Project Explorer.
Select Insert->UserForm.
Design how you'd like the Welcome screen to display.
In ThisWorkbook's Workbook_Open() sub, put UserForm.Show() to display the custom welcome message when the workbook first opens.
As far as animating said text, Not really. There are some convoluted workarounds using an embedded webbrowser object in order to render a custom animated text javascript file. It is full of 'Potential Risk' notifications for the user and really doesn't look very good. Sorry to burst your bubble :).

Excel - how to hide value in a chart's datalebel

I have embedded an image to a chart's datalabel. I want to only keep the image and not the value which appears on top of the image.
However I'm not sure how i can get rid of the value to only show the image?
I thought could've set the font colour to transparent but that's not available. I also played around with the number formatter but had no luck?
I'm using Windows/Excel 2010
Thanks
Clicking on one of the data labels once will select all of them, clicking a second time will select only the one you clicked on. Then just hit the delete button. (You should also be able to edit the font/colour in the Home tab.)

How do I allow user to select, but not edit, text in an excel userform control whose width is smaller than the text?

Context
I want the user to review some selections they made earlier. So I display some text describing each selection on a separate control in a userform. Some of the text on the controls is long, extending beyond the width of the control. This is fine; I just want the user to be able to see all of the text without being able to edit it. To do this, I use textboxes that are "Locked" (i.e. not editable) but "Enabled" (i.e. selectable). This way, they can just click and either mouse-drag or arrow-key over to scroll through all the text.
Problem
The (small, aesthetic) problem is that when the user clicks in one of the textboxes, they get a blinking cursor, which is misleading as that is normally associated with an editable textbox.
Possible solutions
Ideally, there would be some way of removing the blinking cursor, while still allowing selection but not edition. However, I'm open to other alternatives that don't have to do with changing the width, or having a scrollbar (the textbox is too short to fit a scrollbar). The best alternative I have so far is changing the background color to a gray to make it slightly more clear that it's not editable.
P.S. I'm very familiar with VBA, so if that's part of the solution, I'm cool with that.
Thanks all!
I had a similar issue, and solved it by using these instructions to create a hidden textbox that the cursor automatically appeared in (invisible to the user).

MFC Ribbon CEdit Textbox Allignment in Panel

I am trying to align two text boxes with two buttons in a panel, and I am unable to find anything about how to force positioning inside the MFC Ribbon Panels.
Here is a picture of what I have currently.
http://i.imgur.com/ofD0b.jpg (Sorry wont let me post images yet, have to link.)
The Change View Date box has the box associated with it sitting below it and the change system date box is up in the top right in the second "column" of controls. I would like to fix this so the Box with the spin controls sits next to the CHange View Date and the box without the controls sits next to Change System Date.
Thoughts? Thanks!
I think yow cannot do it.
What you can do is to put a Ribbon Separator after the Box with the spin controls and then set the property 'Center Column Vertically' on the Panel.
Hope it can help.

Resources