|
-
Nov 22nd, 2006, 02:47 AM
#1
Thread Starter
Member
[RESOLVED] dynamic
morning,
im working on dynamic forms and im facing real big problems.. I am creating an application similar to visual basic.
so when i create a dynamic control (run-time), I want its properties to appear in the buttom left corner as in VB. i created MSFlexGrid and its filled according to the selected control by getting its properties from a database i filled manually.
the problem is some of vb controls are changed by comboBox and some you just fill them in ( Text Box )
for ex. cmdButton , (name) : (textbox) .. appearance : (comboBox)
is that clear?
-
Nov 22nd, 2006, 02:53 AM
#2
Re: dynamic
do you have any unique code/name for each control loaded on the form...if so, cant you fecth the details of the selected control from the database and display it in the grid...could you post your code
If an answer to your question has been helpful, then please, Rate it!
Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.
-
Nov 22nd, 2006, 03:04 AM
#3
Thread Starter
Member
Re: dynamic
i can fetch details from database and i have done so..
to be more specific , I want to fill my MSFlexGrid with data exactly like "VB.6" properties table/grid .. some cells have textboxes to fill in ( i used hidden textbox an aligned it to selected cell ) and other cells just have comboBoxes and some (like picture) you have to click a button to browse and select a pic.
-
Nov 22nd, 2006, 03:41 AM
#4
Member
Re: dynamic
You have to have a hidden textbox and a hidden combobox and depending on the text in the left column of the flexgrid you show one of them at position
flexgrid.top + flexgrid.rowpos(flexgrid.row), flexgrid.left + flexgrid.colpos(flexgrid.col)
You can save the property values in the events Lostfocus and keypress where keyascii = 13 (return key)
This will require some trial and error before it runs smoothly.
-
Nov 22nd, 2006, 04:26 AM
#5
Thread Starter
Member
Re: dynamic
thanx
but still, how can i insert a browse button to the cell like the picture property?
-
Nov 22nd, 2006, 04:56 AM
#6
Member
Re: dynamic
Same procedure as for the textbox and combobox, add a hidden command button to the form. When you select the row that has the text "picture" or "image" in the left column you will move the textbox and browse button to the coordinates of the current cell and make them visible.
You have to decrease the width of the textbox by the width of the browse button and put the browse button at the same top position as the textbox and at the left position of the textbox + the width of the textbox.
For Example:
VB Code:
if grdProperties.textmatrix(grdproperties.row,0) = "Picture" then
txtProperties.move grdProperties.left + grdProperties.Colpos(1), grdProperties.top + grdProperties.Rowpos(grdProperties.row),txtProperties.height, grdProperties.ColWidth(0) - cmdBrowse.width
cmdBrowse.move txtProperties.Left + txtProperties.width, txtProperties.top
txtProperties.visible=true
cmbBrowse.visible=true
end if
-
Nov 22nd, 2006, 08:22 AM
#7
Thread Starter
Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|