help to manage database files .mdb

Started by mclisp, January 25, 2013, 01:45:32 AM

Previous topic - Next topic

mclisp

I greet all
I'm starting to use OpenDCL I need help.
with adolisp the library, I have to handle many files. mdb access.
I can create a list with the names of file.mdb example  ("file1" "file2" "file3")
I can create a list with the names of the tables contained in the above file example ("tab1" "tab2" "tab3" "tab4")
I can create a list with the names of all the column headings example  ("col1" "col2" "col3" col4")
I can create a list of all data row from the file example (("row1" 1 2 3)("row2" 1 2 3)("row3" 1 2 3))

I would like to to read and display the values of each row of these file. mdb using combobox
and text boxes to display the values
anyone have an example to do this.
any help is appreciated.
thanks
mclisp

Fred Tomke

Hi, do you mean filling a combobox with a list of field values? Then you have to use (dcl_Control_SetList myproj_myform_mycombo lstNewValues).
But if you mean a combobox in a grid then you have to set the list by using  (dcl_Grid_SetCellDropList myproj_myform_mygrid 5 2 lstNewValues).
Maybe you have a small project to illustrate.

Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

mclisp

#2
hi
I managed to do what I asked above thanks
now I have another problem:
because this function (drawrectangle) CheckBox works

(defun c:Rectangle_Form1_CheckBox1_OnClicked (Value /)
  (setq Diagonal Value)(princ)
    (drawrectangle) <<<<<<<<<<<<<<<<<<<ok work
(princ))

This function (drawrectangle) ComboBox does not work
(defun c:Rectangle_Form1_ComboBox3_OnSelChanged (ItemIndexOrCount Value / )
(setq n ItemIndexOrCount
      #Name (nth n #ListaNomiProfili) <<ok work
      #Data (nth n #TableData))         <<<ok work
(drawrectangle)<<<<<<<<<<<<<<<<<<<<< NO Work
    )

what is wrong?
Thank you for your time

mclisp

here you can see how the function (DrawRectangle) works with CheckBox,  works with TextBox 
and does not work with ComboBox
Why?

http://www.youtube.com/watch?v=wX8jUmiUZ4k&feature=youtu.be

owenwengerd

Quote from: mclisp on February 02, 2013, 04:06:18 AM
here you can see how the function (DrawRectangle) works with CheckBox,  works with TextBox 
and does not work with ComboBox

Where exactly can I see (DrawRectangle)? I watched your video, but did not see that code anywhhere.

mclisp

hello
Thank you for your time.
I'm learning OpenDCL be patient.
I simplified the program to repeat what does not work.
if I change the value of the function COMBOBOX3 (DrawRectangle) crashes and error: invalid AutoCAD command: nil
this error does not happen with TEXTBOX and CHECBOX.
I want that if I change the value in COMBOBOX3 you redraw the rectangle.
thanks again.

owenwengerd

Good job at simplifying the problem. When your event handler code is called from a modeless form, you have to be careful about calling the (command) function. If you set the Event Invoke property for your combo box controls to 1 - Asynchronous, calls to the (command) function should work. You can check the OpenDCL help or search the forum for 'asynchronous' to read more.

mclisp

thank you very much owenwengerd
I was going crazy, now works
ciao

mclisp

I want to share my efforts to learn OpenDCL use version 7.0.0.5
https://sites.google.com/site/mclisp/prosteel-3d-creating-parametric-cross
I am very happy and I thank you for your help.
I still ask for help, I want to insert the image above a CHECK BOX
but I can not, it is still below the image,
even if active the Send to Back Control OFZ / Tab order
you have any idea?
thanks again

Fred Tomke

Hi, make sure that the backcolor of the checkbox is not -24 (transparent).
Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

owenwengerd

Tab/Z order does not control painting order. The only thing that Windows guarantees is that transparent controls will always be painted after non-transparent sibling controls. If you want the check box "above" the picturebox, then the check box must be transparent and the picture box must not be transparent. You may also find it helpful to uncheck "Use visual style" for the check box, as the current checkbox visual style may not support transparency.

mclisp

#11
perfect,  very nice
I have many macros you create the interface,
I can have your opinion, critical, defect, problem on my method of creating form.
ie with background image.
I find it very intuitive?
easy to use and does not require a lot of translation in different languages.
what do you think.
what are the problems that you may encounter?
what do you think
thanks again

mclisp

hi
wonder if it is possible to rotate a textbox of 90 °.
For now believe is not possible,
you could do in the future?
thanks

owenwengerd

A text box is a standard Windows control that doesn't support rotation, so it isn't possible without making a new control type.

mclisp

#14
I like to think that one day there will be this new control.
thanks anyway