How to get selected id in Color adapter under Size Adapter - android-recyclerview

There is a Size adapter & under the size adapter, i added a color adapter. How can i get the selected size id & selected color id.

Related

Word VBA to return the height and width of a preselected image

I have a Word macro that changes the orientation and page size of an individual page to accommodate the image placed on the selected page. My existing macro code does the page and footer resizing correctly (footers are based on our existing footer styles), but I'd like to enhance the code to display the height and width of the selected image before the userform appears to help guide the user's page size choice.
The user could get that information by right-clicking the image, choosing "Picture...", and selecting the "Size" tab in the "Format Object" window, but I am trying to have the height/width displayed as part of the macro instead of asking the user to follow those steps.
Editors in my department sometimes encounter documents in which an image has been placed on a page that is not wide enough to accommodate the entire image, resulting in part of the image being "cut off." My plan has been to have the user select the image on the Word page, then run the macro; the image's height and width (in inches, ideally) should be displayed prior to the user to selecting the optimal page size.
I've tried working with Selection.ShapeRange or Selection.InlineShapes, but I haven't yet been able to get the current height and width of the selected image. Any help will be greatly appreciated.
Thank you,
KRS
Here's how I opted to handle this:
My macro was designed to start with the user selecting an inline shape on the Word page. With that selection, I start by setting variables for the selection's width and height in points, convert to inches, and display the results in a MsgBox:
myHeightPoints = .Height
myWidthPoints = .Width
`Convert the previously established variable to inches`
`Dim myHeightInches As Double
Dim myWidthInches As Double
myHeightInches = myHeightPoints / Application.InchesToPoints(1)
myWidthInches = myWidthPoints / Application.InchesToPoints(1)
`Trim the result to 2 decimal places`
Dim myHeightDisplay
Dim myWidthDisplay
myHeightDisplay = Format(myHeightInches, "#.00")
myWidthDisplay = Format(myWidthInches, "#.00")
`Display the result`
MsgBox ("The selected image is " & myHeightDisplay & " H X " & myWidthDisplay
& " W" & Chr(13) & "Choose a page size that accomodates the figure and its caption.")

vb.net Datagridview scrollbar won't show last column

I'm working with Visual studio 2012 - Visual Basic.net
In my DGV I set the .AutoSizeMode for each column as follows:
with dgv_Clients
.Columns("Name").AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells
.Columns("Phone").AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells
.Columns("Email").AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells
.Columns("Address").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
end with
This configuration makes all cells to show the full text inside and the last column will be as big as needed to fit the blank space.
The problem comes when I resize the form shorter than the 3 columns; the horizontal scroll bar is shown but it doesn't show the last column.
If I change the "AutoSizeMode" from "Fill" to "AllCells" the scroll bar works fine but if the form is resized too long there is an ugly blank space.
Question:
How can I make the scroll bar to show the last column when the "AutoSizeMode" is set to "Fill" ??
You can set a minimum width of the fill column like this:
.Columns("Address").MinimumWidth = 100
The default value of this property is 5.

How to Change Form Width Depending on Datagridview's Data

I have a form that contains a datagridview. The cells in the datagridview expand or contract depending on text width.
How can I make the parent form in which the data grid is docked also contract or expand to the cell (total of all cells) width?
Hence I want the parent form to change in the row (width) size and not in the column (height) size?
Im using vb.net
I would recommend just making it so that users can resize the program to the width that they want, and have the datagridview adjust it's width to fit the forms width. If you adjust it based on the columns, then it could cause issues where the form is bigger than the users screen. The easiest way to do this is by using the Dock and Anchor attributes.
If you really want to have the form adjust it's width to fit the columns, you would have to loop through the columns and add the width values together after it is databound. After you get the total width, you would have to set your forms width
The code would look something like this:
Dim intWidth As Integer
For Each dgvcc As DataGridViewColumn In DataGridView1.Columns
intWidth += dgvcc.Width
Next
Me.Width = intWidth

Set radgrid row background color dependant on bound column

I would like to configure my RadGrid to show a icon or perhaps a different row colour when a activity flag in the bound row is set to true.
Can I do this in JS?
Basically I have a grid of data bound to a entity statement in code behind. One of the columns is TicketActivity and when set to true I would like the gridrow to show an icon (red dot or something) or change the background colour of the grid row.

Remove "column" form DojoX Grid 1.2

is there any way to remove the red marked "select column" from an dojo grid?
This specific column is used to display the row selector to select rows. To disable that, just set the rowSelector property of the grid to false.
For example,
var grid = new dojox.grid.DataGrid({rowSelector:false}, node);